Initial commit
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
namespace Ifabrik\IfAccessButtons\Tests\Unit\Controller;
|
||||
/***************************************************************
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Marco Kuprat <mk@internetfabrik.de>, Internetfabrik GmbH
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
/**
|
||||
* Test case for class Ifabrik\IfAccessButtons\Controller\AccessibilityButtonsController.
|
||||
*
|
||||
* @author Marco Kuprat <mk@internetfabrik.de>
|
||||
*/
|
||||
class AccessibilityButtonsControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||
|
||||
/**
|
||||
* @var \Ifabrik\IfAccessButtons\Controller\AccessibilityButtonsController
|
||||
*/
|
||||
protected $subject = NULL;
|
||||
|
||||
public function setUp() {
|
||||
$this->subject = $this->getMock('Ifabrik\\IfAccessButtons\\Controller\\AccessibilityButtonsController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
unset($this->subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function showActionAssignsTheGivenAccessibilityButtonsToView() {
|
||||
$accessibilityButtons = new \Ifabrik\IfAccessButtons\Domain\Model\AccessibilityButtons();
|
||||
|
||||
$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
|
||||
$this->inject($this->subject, 'view', $view);
|
||||
$view->expects($this->once())->method('assign')->with('accessibilityButtons', $accessibilityButtons);
|
||||
|
||||
$this->subject->showAction($accessibilityButtons);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace Ifabrik\IfAccessButtons\Tests\Unit\Domain\Model;
|
||||
|
||||
/***************************************************************
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Marco Kuprat <mk@internetfabrik.de>, Internetfabrik GmbH
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
/**
|
||||
* Test case for class \Ifabrik\IfAccessButtons\Domain\Model\AccessibilityButtons.
|
||||
*
|
||||
* @copyright Copyright belongs to the respective authors
|
||||
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
|
||||
*
|
||||
* @author Marco Kuprat <mk@internetfabrik.de>
|
||||
*/
|
||||
class AccessibilityButtonsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||
/**
|
||||
* @var \Ifabrik\IfAccessButtons\Domain\Model\AccessibilityButtons
|
||||
*/
|
||||
protected $subject = NULL;
|
||||
|
||||
public function setUp() {
|
||||
$this->subject = new \Ifabrik\IfAccessButtons\Domain\Model\AccessibilityButtons();
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
unset($this->subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function dummyTestToNotLeaveThisFileEmpty() {
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user