[TASK] Make use of autoloading for fixtures in testclasses 31/24131/3
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 28 Sep 2013 20:47:34 +0000 (22:47 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 12 Oct 2013 17:38:34 +0000 (19:38 +0200)
Autoloader can be used in almost all cases.

Change-Id: I853e85758f6b39a6cb0798891ca0bea40ad6915c
Resolves: #52357
Releases: 6.2
Reviewed-on: https://review.typo3.org/24131
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
77 files changed:
typo3/sysext/core/Tests/Unit/Cache/FactoryTest.php
typo3/sysext/core/Tests/Unit/FormProtection/AbstractFormProtectionTest.php
typo3/sysext/core/Tests/Unit/FormProtection/FormProtectionFactoryTest.php
typo3/sysext/core/Tests/Unit/Log/LoggerTest.php
typo3/sysext/core/Tests/Unit/Log/Processor/AbstractTest.php
typo3/sysext/core/Tests/Unit/Log/Writer/AbstractTest.php
typo3/sysext/core/Tests/Unit/Resource/Driver/AbstractDriverTest.php
typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php
typo3/sysext/core/Tests/Unit/Utility/MathUtilityTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/PersistenceManagerTest.php
typo3/sysext/extbase/Tests/Unit/Property/PropertyMapperTest.php
typo3/sysext/extbase/Tests/Unit/Property/PropertyMappingConfigurationBuilderTest.php
typo3/sysext/extbase/Tests/Unit/Property/PropertyMappingConfigurationTest.php
typo3/sysext/extbase/Tests/Unit/Reflection/ObjectAccessTest.php
typo3/sysext/extbase/Tests/Unit/Scheduler/Fixtures/MockACommandController.php
typo3/sysext/extbase/Tests/Unit/Scheduler/TaskExecuterTest.php [deleted file]
typo3/sysext/extbase/Tests/Unit/Scheduler/TaskExecutorTest.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AlphanumericValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/BooleanValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/EmailAddressValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/FloatValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/GenericObjectValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/IntegerValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/NotEmptyValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/NumberRangeValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/NumberValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/RawValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/RegularExpressionValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/StringLengthValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/StringValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/TextValidatorTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/ChildNodeAccessFacetViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/PostParseFacetViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractConditionViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/AliasViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfAuthenticatedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfHasRoleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CaseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CountViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CycleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FlashMessagesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ForViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/ButtonViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/UserDomainClass.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/FormFieldViewHelperBaseTestcase.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/PasswordViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextfieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/IfViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/PageViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/RenderChildrenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/RenderViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfAuthenticatedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfHasRoleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/SwitchViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php

index ea2c30d..db02475 100644 (file)
@@ -24,8 +24,6 @@ namespace TYPO3\CMS\Core\Tests\Unit\Cache;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once 'Backend/MockBackend.php';
-
 /**
  * Testcase for the TYPO3\CMS\Core\Cache\CacheFactory
  *
index d6b07c9..81d50aa 100644 (file)
@@ -24,8 +24,6 @@ namespace TYPO3\CMS\Core\Tests\Unit\FormProtection;
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once 'Fixtures/FormProtectionTesting.php';
-
 /**
  * Testcase
  *
index 9185fe2..554ef6a 100644 (file)
@@ -24,15 +24,13 @@ namespace TYPO3\CMS\Core\Tests\Unit\FormProtection;
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once 'Fixtures/FormProtectionTesting.php';
-
 /**
  * Testcase
  *
  * @author Oliver Klee <typo3-coding@oliverklee.de>
  * @author Ernesto Baschny <ernst@cron-it.de>
  */
-class FormprotectionFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
+class FormProtectionFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
        public function setUp() {
 
index 53e12ec..eea5078 100644 (file)
@@ -25,9 +25,6 @@ namespace TYPO3\CMS\Core\Tests\Unit\Log;
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once 'Fixtures/WriterFixture.php';
-require_once 'Fixtures/WriterFailing.php';
-
 /**
  * Testcase for \TYPO3\CMS\Core\Log\Logger.
  *
index e2c8a19..daa134d 100644 (file)
@@ -24,8 +24,6 @@ namespace TYPO3\CMS\Core\Tests\Unit\Log\Processor;
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once __DIR__ . DIRECTORY_SEPARATOR . '../Fixtures/ProcessorFixture.php';
-
 /**
  * Testcase for \TYPO3\CMS\Core\Log\Processor\Abstract
  *
index 265c960..e7af519 100644 (file)
@@ -24,8 +24,6 @@ namespace TYPO3\CMS\Core\Tests\Unit\Log\Writer;
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once __DIR__ . DIRECTORY_SEPARATOR . '../Fixtures/WriterFixture.php';
-
 /**
  * Testcase for \TYPO3\CMS\Core\Log\Writer\AbstractWriter
  *
index 9168f65..0a69120 100644 (file)
@@ -27,8 +27,6 @@ namespace TYPO3\CMS\Core\Tests\Unit\Resource\Driver;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once dirname(__FILE__) . '/../BaseTestCase.php';
-
 /**
  * Test case for the abstract driver.
  *
index f1b3bf7..6e0f458 100644 (file)
@@ -31,9 +31,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use \org\bovigo\vfs\vfsStream;
 use \org\bovigo\vfs\vfsStreamWrapper;
 
-require_once dirname(dirname(__FILE__)) . '/BaseTestCase.php';
-require_once dirname(__FILE__) . '/Fixtures/LocalDriverFilenameFilter.php';
-
 /**
  * Testcase for the local storage driver class of the TYPO3 VFS
  *
index 37304a5..0fccc9f 100644 (file)
@@ -24,8 +24,6 @@ namespace TYPO3\CMS\Core\Tests\Unit\Utility;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once 'Fixtures/MathUtilityTestClassWithStringRepresentationFixture.php';
-
 /**
  * Testcase for class \TYPO3\CMS\Core\Utility\MathUtility
  *
index 9136d51..93e0b9f 100644 (file)
@@ -27,9 +27,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once __DIR__ . '/../Fixture/Model/Entity3.php';
-require_once __DIR__ . '/../Fixture/Model/Entity2.php';
-
 /**
  * A PersistenceManager Test
  */
index 9f06b80..fc3bc7d 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Property;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -21,8 +21,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Property;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once __DIR__ . '/../../Fixture/ClassWithSetters.php';
-
 /**
  * Testcase for the Property Mapper
  *
index 5c6ee4f..eb282b9 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Property;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -21,8 +21,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Property;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once __DIR__ . '/../../Fixture/ClassWithSetters.php';
-
 /**
  * Testcase for the Property Mapper
  *
index bcb6d42..dad32b8 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Property;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -21,8 +21,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Property;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once __DIR__ . '/../../Fixture/ClassWithSetters.php';
-
 /**
  * Testcase for the Property Mapper
  *
index 31a2434..26f297d 100644 (file)
@@ -25,8 +25,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Reflection;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
-require_once __DIR__ . '/Fixture/DummyClassWithGettersAndSetters.php';
-require_once __DIR__ . '/Fixture/ArrayAccessClass.php';
 
 /**
  * Test Unit Test Base Class
index cf310d0..eaaac19 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Extbase\Tests;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * MockACommandController Fixture
  */
diff --git a/typo3/sysext/extbase/Tests/Unit/Scheduler/TaskExecuterTest.php b/typo3/sysext/extbase/Tests/Unit/Scheduler/TaskExecuterTest.php
deleted file mode 100644 (file)
index c34357d..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-namespace TYPO3\CMS\Extbase\Tests\Unit\Scheduler;
-
-require_once __DIR__ . '/Fixtures/MockACommandController.php';
-
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010-2013 Extbase Team (http://forge.typo3.org/projects/typo3v4-mvc)
- *  Extbase is a backport of TYPO3 Flow. All credits go to the TYPO3 Flow team.
- *  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.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  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!
- ***************************************************************/
-/**
- * TaskExecutor Test Class
- */
-class TaskExecutorTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
-
-       /**
-        * @var \TYPO3\CMS\Extbase\Mvc\Controller\CommandController|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject
-        */
-       protected $controller;
-
-       /**
-        * @var \TYPO3\CMS\Core\Cache\CacheManager|\PHPUnit_Framework_MockObject_MockObject
-        */
-       protected $cacheManager;
-
-       /**
-        * @var \TYPO3\CMS\Extbase\Object\ObjectManager|\PHPUnit_Framework_MockObject_MockObject
-        */
-       protected $objectManager;
-
-       /**
-        * @var \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager|\PHPUnit_Framework_MockObject_MockObject
-        */
-       protected $commandManager;
-
-       /**
-        * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject
-        */
-       protected $configurationManager;
-
-       /**
-        * @var \TYPO3\CMS\Extbase\Scheduler\TaskExecutor|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject
-        */
-       protected $taskExecuter;
-
-       public function setUp() {
-               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('scheduler')) {
-                       $this->markTestSkipped('Tests need EXT:scheduler loaded.');
-               }
-               $this->controller = $this->getAccessibleMock('TYPO3\CMS\Extbase\Tests\MockACommandController', array('dummy'));
-               $this->controller->_set('reflectionService', $this->objectManager->get('TYPO3\CMS\Extbase\Reflection\ReflectionService'));
-               $this->controller->_set('objectManager', $this->objectManager);
-
-               $command = new \TYPO3\CMS\Extbase\Mvc\Cli\Command('TYPO3\CMS\Extbase\Tests\MockACommandController', 'funcA');
-               $nullBackend = new \TYPO3\CMS\Core\Cache\Backend\NullBackend('production');
-               $variableFrontend = new \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend('foo', $nullBackend);
-
-               $this->cacheManager = $this->getMock('TYPO3\CMS\Core\Cache\CacheManager', array('dummy', 'getCache'));
-               $this->cacheManager->expects($this->any())->method('getCache')->will($this->returnValue($variableFrontend));
-               $GLOBALS['typo3CacheManager'] = $this->cacheManager;
-
-               $this->objectManager = $this->getMock('TYPO3\CMS\Extbase\Object\ObjectManager', array('dummy'));
-               $this->commandManager = $this->getMock('TYPO3\CMS\Extbase\Mvc\Cli\CommandManager', array('dummy', 'getCommandByIdentifier'));
-               $this->configurationManager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Configuration\ConfigurationManager', array('dummy', 'getConfiguration', 'setContentObject', 'setConfiguration'));
-
-               $this->configurationManager
-                       ->expects($this->once())
-                       ->method('getConfiguration')
-                       ->with(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
-                       ->will($this->returnValue(array()));
-
-               $this->commandManager
-                       ->expects($this->any())
-                       ->method('getCommandByIdentifier')
-                       ->will($this->returnValue($command));
-       }
-
-       /**
-        * @test
-        * @author Alexander Schnitzler <alex.schnitzler@typovision.de>
-        */
-       public function executeDispatchesTheRightCommandControllerAndCommandAction() {
-               $dispatcher = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Dispatcher', array('resolveController'), array($this->objectManager));
-               $dispatcher->expects($this->any())->method('resolveController')->will($this->returnValue($this->controller));
-               $dispatcher->_set('signalSlotDispatcher', $this->objectManager->get('TYPO3\CMS\Extbase\SignalSlot\Dispatcher'));
-
-               $this->taskExecuter = $this->getAccessibleMock('TYPO3\CMS\Extbase\Scheduler\TaskExecutor', array('dummy', 'shutdown', 'getDispatcher'));
-               $this->taskExecuter->expects($this->any())->method('getDispatcher')->will($this->returnValue($dispatcher));
-               $this->taskExecuter->_set('objectManager', $this->objectManager);
-               $this->taskExecuter->_set('commandManager', $this->commandManager);
-               $this->taskExecuter->_set('configurationManager', $this->configurationManager);
-               $this->taskExecuter->initializeObject();
-
-               /** @var $task \TYPO3\CMS\Extbase\Scheduler\Task|\PHPUnit_Framework_MockObject_MockObject */
-               $task = $this->getMock('TYPO3\CMS\Extbase\Scheduler\Task', array('dummy', 'getCommandIdentifier'));
-               $task->expects($this->any())->method('getCommandIdentifier')->will($this->returnValue('extbase:controller:command'));
-               $this->taskExecuter->execute($task);
-
-               $this->assertSame('Foo', $this->taskExecuter->_get('response')->getContent());
-       }
-}
diff --git a/typo3/sysext/extbase/Tests/Unit/Scheduler/TaskExecutorTest.php b/typo3/sysext/extbase/Tests/Unit/Scheduler/TaskExecutorTest.php
new file mode 100644 (file)
index 0000000..6475fcf
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+namespace TYPO3\CMS\Extbase\Tests\Unit\Scheduler;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010-2013 Extbase Team (http://forge.typo3.org/projects/typo3v4-mvc)
+ *  Extbase is a backport of TYPO3 Flow. All credits go to the TYPO3 Flow team.
+ *  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.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  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!
+ ***************************************************************/
+
+/**
+ * TaskExecutor Test Class
+ */
+class TaskExecutorTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
+
+       /**
+        * @var \TYPO3\CMS\Extbase\Mvc\Controller\CommandController|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject
+        */
+       protected $controller;
+
+       /**
+        * @var \TYPO3\CMS\Core\Cache\CacheManager|\PHPUnit_Framework_MockObject_MockObject
+        */
+       protected $cacheManager;
+
+       /**
+        * @var \TYPO3\CMS\Extbase\Object\ObjectManager|\PHPUnit_Framework_MockObject_MockObject
+        */
+       protected $objectManager;
+
+       /**
+        * @var \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager|\PHPUnit_Framework_MockObject_MockObject
+        */
+       protected $commandManager;
+
+       /**
+        * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject
+        */
+       protected $configurationManager;
+
+       /**
+        * @var \TYPO3\CMS\Extbase\Scheduler\TaskExecutor|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject
+        */
+       protected $taskExecuter;
+
+       public function setUp() {
+               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('scheduler')) {
+                       $this->markTestSkipped('Tests need EXT:scheduler loaded.');
+               }
+               $this->controller = $this->getAccessibleMock('TYPO3\CMS\Extbase\Tests\MockACommandController', array('dummy'));
+               $this->controller->_set('reflectionService', $this->objectManager->get('TYPO3\CMS\Extbase\Reflection\ReflectionService'));
+               $this->controller->_set('objectManager', $this->objectManager);
+
+               $command = new \TYPO3\CMS\Extbase\Mvc\Cli\Command('TYPO3\CMS\Extbase\Tests\MockACommandController', 'funcA');
+               $nullBackend = new \TYPO3\CMS\Core\Cache\Backend\NullBackend('production');
+               $variableFrontend = new \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend('foo', $nullBackend);
+
+               $this->cacheManager = $this->getMock('TYPO3\CMS\Core\Cache\CacheManager', array('dummy', 'getCache'));
+               $this->cacheManager->expects($this->any())->method('getCache')->will($this->returnValue($variableFrontend));
+               $GLOBALS['typo3CacheManager'] = $this->cacheManager;
+
+               $this->objectManager = $this->getMock('TYPO3\CMS\Extbase\Object\ObjectManager', array('dummy'));
+               $this->commandManager = $this->getMock('TYPO3\CMS\Extbase\Mvc\Cli\CommandManager', array('dummy', 'getCommandByIdentifier'));
+               $this->configurationManager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Configuration\ConfigurationManager', array('dummy', 'getConfiguration', 'setContentObject', 'setConfiguration'));
+
+               $this->configurationManager
+                       ->expects($this->once())
+                       ->method('getConfiguration')
+                       ->with(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
+                       ->will($this->returnValue(array()));
+
+               $this->commandManager
+                       ->expects($this->any())
+                       ->method('getCommandByIdentifier')
+                       ->will($this->returnValue($command));
+       }
+
+       /**
+        * @test
+        * @author Alexander Schnitzler <alex.schnitzler@typovision.de>
+        */
+       public function executeDispatchesTheRightCommandControllerAndCommandAction() {
+               $dispatcher = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Dispatcher', array('resolveController'), array($this->objectManager));
+               $dispatcher->expects($this->any())->method('resolveController')->will($this->returnValue($this->controller));
+               $dispatcher->_set('signalSlotDispatcher', $this->objectManager->get('TYPO3\CMS\Extbase\SignalSlot\Dispatcher'));
+
+               $this->taskExecuter = $this->getAccessibleMock('TYPO3\CMS\Extbase\Scheduler\TaskExecutor', array('dummy', 'shutdown', 'getDispatcher'));
+               $this->taskExecuter->expects($this->any())->method('getDispatcher')->will($this->returnValue($dispatcher));
+               $this->taskExecuter->_set('objectManager', $this->objectManager);
+               $this->taskExecuter->_set('commandManager', $this->commandManager);
+               $this->taskExecuter->_set('configurationManager', $this->configurationManager);
+               $this->taskExecuter->initializeObject();
+
+               /** @var $task \TYPO3\CMS\Extbase\Scheduler\Task|\PHPUnit_Framework_MockObject_MockObject */
+               $task = $this->getMock('TYPO3\CMS\Extbase\Scheduler\Task', array('dummy', 'getCommandIdentifier'));
+               $task->expects($this->any())->method('getCommandIdentifier')->will($this->returnValue('extbase:controller:command'));
+               $this->taskExecuter->execute($task);
+
+               $this->assertSame('Foo', $this->taskExecuter->_get('response')->getContent());
+       }
+}
index 277018c..00d57f3 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the alphanumeric validator
index 0602940..5da8e87 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the number range validator
index 4bf7207..fbe4da3 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the email address validator
index 343b748..0fcd973 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the float validator
index 365db46..fcbe0ac 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the Generic Object Validator
index dcdfb97..8d46cde 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the integer validator
index c32aff8..4de1801 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the not empty validator
index 0eadf46..6797fb6 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the number range validator
index 75aec8e..d609204 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the number validator
index 68d73c9..9ae483e 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the raw validator
index d59a78e..e72e2ec 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the regular expression validator
index 60b004d..9ad776b 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the string length validator
index aec8786..4cfbeb8 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the string length validator
index 0c1dc42..898ad89 100644 (file)
@@ -2,7 +2,7 @@
 namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 
 /*                                                                        *
- * This script belongs to the Extbase framework.                            *
+ * This script belongs to the Extbase framework.                          *
  *                                                                        *
  * It is free software; you can redistribute it and/or modify it under    *
  * the terms of the GNU Lesser General Public License as published by the *
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/AbstractValidatorTestcase.php';
 
 /**
  * Testcase for the text validator
index f36d5cd..c726774 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-namespace TYPO3\CMS\Fluid\Core\Parser\Fixtures;
+namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Parser\Fixtures;
 
 /*                                                                        *
  * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
index 6c56e1c..ae2a6dd 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-namespace TYPO3\CMS\Fluid\Core\Parser\Fixtures;
+namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Parser\Fixtures;
 
 /*                                                                        *
  * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
index 1bb0fad..ed88d3d 100644 (file)
@@ -11,9 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Parser\SyntaxTree;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once __DIR__ . '/../Fixtures/ChildNodeAccessFacetViewHelper.php';
-require_once __DIR__ . '/../../Fixtures/TestViewHelper.php';
-
 /**
  * Testcase for \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode
  */
@@ -87,7 +84,7 @@ class ViewHelperNodeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
        public function childNodeAccessFacetWorksAsExpected() {
                $childNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\TextNode', array(), array('foo'));
 
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\Fixtures\\ChildNodeAccessFacetViewHelper', array('setChildNodes', 'initializeArguments', 'render', 'prepareArguments'));
+               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Tests\\Unit\\Core\\Parser\\Fixtures\\ChildNodeAccessFacetViewHelper', array('setChildNodes', 'initializeArguments', 'render', 'prepareArguments'));
 
                $viewHelperNode = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode($mockViewHelper, array());
                $viewHelperNode->addChildNode($childNode);
index 31d562d..f598ec5 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Parser;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/Fixtures/PostParseFacetViewHelper.php');
-
 /**
  * Testcase for TemplateParser.
  *
@@ -357,7 +355,7 @@ class TemplateParserTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
         * @test
         */
        public function initializeViewHelperAndAddItToStackHandlesPostParseFacets() {
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\Fixtures\\PostParseFacetViewHelper', array('prepareArguments'));
+               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Tests\\Unit\\Core\\Parser\\Fixtures\\PostParseFacetViewHelper', array('prepareArguments'));
                $mockViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array(), array(), '', FALSE);
 
                $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface');
@@ -375,7 +373,7 @@ class TemplateParserTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $templateParser->injectObjectManager($mockObjectManager);
 
                $templateParser->_call('initializeViewHelperAndAddItToStack', $mockState, 'f', 'myown', array('arguments'));
-               $this->assertTrue(\TYPO3\CMS\Fluid\Core\Parser\Fixtures\PostParseFacetViewHelper::$wasCalled, 'PostParse was not called!');
+               $this->assertTrue(\TYPO3\CMS\Fluid\Tests\Unit\Core\Parser\Fixtures\PostParseFacetViewHelper::$wasCalled, 'PostParse was not called!');
        }
 
        /**
index 092ddad..0f2db89 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\Core\ViewHelper;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/../../ViewHelpers/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for Condition ViewHelper
  */
index d4b70b2..2992ed2 100644 (file)
@@ -11,9 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\Core\ViewHelper;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/../Fixtures/TestViewHelper.php');
-require_once(__DIR__ . '/../Fixtures/TestViewHelper2.php');
-
 /**
  * Testcase for AbstractViewHelper
  */
index c15330c..93e3974 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\Core\ViewHelper;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/../Fixtures/TestViewHelper.php');
-
 /**
  * Testcase for AbstractViewHelper
  */
index 11e2b5a..905cde1 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for AliasViewHelper
  */
index 165b796..60535a2 100644 (file)
@@ -11,7 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
 /**
  */
 class BaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase {
index 4a1d4b1..a6764c8 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Be;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/../ViewHelperBaseTestcase.php';
 
 /**
  * Testcase for be.security.ifAuthenticated view helper
index 626254b..3bde42a 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Be;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/../ViewHelperBaseTestcase.php';
 
 /**
  * Testcase for be.security.ifHasRole view helper
index c7350c1..18427e6 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for CaseViewHelper
  */
index a304bbb..a9eaf08 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for CountViewHelper
  */
index de20580..3e6fa87 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for CycleViewHelper
  */
index d129ffd..b3568f0 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for ElseViewHelper
  */
index 2d6bf42..ad59c2d 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for FlashMessagesViewHelper
  */
index ef6a886..f99ead6 100644 (file)
@@ -11,9 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-include_once(__DIR__ . '/Fixtures/ConstraintSyntaxTreeNode.php');
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for ForViewHelper
  */
index 75616e6..0ce8104 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the Abstract Form view helper
  */
index c00932c..a25d922 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/../ViewHelperBaseTestcase.php';
 
 /**
  * Test for the Abstract Form view helper
index a796b58..85ea080 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Button" Form view helper
  */
index 874eef2..c2ac397 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Checkbox" Form view helper
  */
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php
deleted file mode 100644 (file)
index 6712f8d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Example domain class which can be used to test different view helpers, e.g. the "select" view helper.
- */
-class UserDomainClass {
-
-       protected $id;
-
-       protected $firstName;
-
-       protected $lastName;
-
-       /**
-        * Constructor.
-        *
-        * @param integer $id
-        * @param string $firstName
-        * @param string $lastName
-        */
-       public function __construct($id, $firstName, $lastName) {
-               $this->id = $id;
-               $this->firstName = $firstName;
-               $this->lastName = $lastName;
-       }
-
-       /**
-        * Return the ID
-        *
-        * @return integer ID
-        */
-       public function getId() {
-               return $this->id;
-       }
-
-       /**
-        * Return the first name
-        *
-        * @return string first name
-        */
-       public function getFirstName() {
-               return $this->firstName;
-       }
-
-       /**
-        * Return the last name
-        *
-        * @return string lastname
-        */
-       public function getLastName() {
-               return $this->lastName;
-       }
-}
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/UserDomainClass.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/UserDomainClass.php
new file mode 100644 (file)
index 0000000..6712f8d
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures;
+
+/*                                                                        *
+ * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License, either version 3   *
+ *  of the License, or (at your option) any later version.                *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * Example domain class which can be used to test different view helpers, e.g. the "select" view helper.
+ */
+class UserDomainClass {
+
+       protected $id;
+
+       protected $firstName;
+
+       protected $lastName;
+
+       /**
+        * Constructor.
+        *
+        * @param integer $id
+        * @param string $firstName
+        * @param string $lastName
+        */
+       public function __construct($id, $firstName, $lastName) {
+               $this->id = $id;
+               $this->firstName = $firstName;
+               $this->lastName = $lastName;
+       }
+
+       /**
+        * Return the ID
+        *
+        * @return integer ID
+        */
+       public function getId() {
+               return $this->id;
+       }
+
+       /**
+        * Return the first name
+        *
+        * @return string first name
+        */
+       public function getFirstName() {
+               return $this->firstName;
+       }
+
+       /**
+        * Return the last name
+        *
+        * @return string lastname
+        */
+       public function getLastName() {
+               return $this->lastName;
+       }
+}
index 8b2fdd8..f396f76 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/../ViewHelperBaseTestcase.php';
 
 /**
  * Test for the Abstract Form view helper
index b8d4ea4..55deaf7 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Hidden" Form view helper
  */
index 46923f0..7079c39 100644 (file)
@@ -11,10 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/Fixtures/EmptySyntaxTreeNode.php');
-require_once(__DIR__ . '/Fixtures/Fixture_UserDomainClass.php');
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Password" Form view helper
  */
index f4ecdbf..39266eb 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Radio" Form view helper
  */
index 810a976..8dfaef2 100644 (file)
@@ -11,10 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/Fixtures/EmptySyntaxTreeNode.php');
-require_once(__DIR__ . '/Fixtures/Fixture_UserDomainClass.php');
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Select" Form view helper
  */
index 8cd3afc..7424110 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Submit" Form view helper
  */
index 58373eb..537a07b 100644 (file)
@@ -11,10 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/Fixtures/EmptySyntaxTreeNode.php');
-require_once(__DIR__ . '/Fixtures/Fixture_UserDomainClass.php');
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Textarea" Form view helper
  */
index b4188e0..95d1145 100644 (file)
@@ -11,10 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/Fixtures/EmptySyntaxTreeNode.php');
-require_once(__DIR__ . '/Fixtures/Fixture_UserDomainClass.php');
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Textfield" Form view helper
  */
index 527f829..c4b03c3 100644 (file)
@@ -11,10 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/Fixtures/EmptySyntaxTreeNode.php');
-require_once(__DIR__ . '/Fixtures/Fixture_UserDomainClass.php');
-require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
-
 /**
  * Test for the "Upload" Form view helper
  */
index 78523fa..60cf51a 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/ViewHelperBaseTestcase.php';
 
 /**
  * Test for the Form view helper
index 3bc7c85..cd48dde 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for GroupedForViewHelper.
  */
index db98af0..908156b 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for IfViewHelper
  */
index 18f45ab..b06003b 100644 (file)
@@ -13,7 +13,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Link;
  * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
  * Public License for more details.                                       *
  *                                                                        */
-require_once __DIR__ . '/../ViewHelperBaseTestcase.php';
 
 /**
 
index 23783fd..0b44866 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Link;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/../ViewHelperBaseTestcase.php');
-
 /**
  * Test for \TYPO3\CMS\Fluid\ViewHelpers\Link\EmailViewHelper
  */
index b4e28ee..13fcd7d 100644 (file)
@@ -18,8 +18,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
 use TYPO3\CMS\Fluid\ViewHelpers\Link\PageViewHelper;
 
-require_once __DIR__ . '/../ViewHelperBaseTestcase.php';
-
 /**
  * Test-case for Link\PageViewHelper
  */
index e8e4899..3e6d180 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/ViewHelperBaseTestcase.php';
 
 /**
  * Testcase for RenderChildren ViewHelper
index f9062b7..f159d26 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for RenderViewHelper
  */
index 59cc87b..511d493 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Security;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/../ViewHelperBaseTestcase.php';
 
 /**
  * Testcase for security.ifAuthenticated view helper
index 20fcea9..1d6f6b8 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Security;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/../ViewHelperBaseTestcase.php';
 
 /**
  * Testcase for security.ifHasRole view helper
index fe2cbf5..bdc93e9 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for SwitchViewHelper
  */
index d1786a7..8f61a38 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for ElseViewHelper
  */
index f0a9427..1279c5d 100644 (file)
@@ -20,7 +20,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-require_once __DIR__ . '/../ViewHelperBaseTestcase.php';
 
 /**
  * Testcase for the email uri view helper
index 34219eb..4e509ef 100644 (file)
@@ -11,8 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
-require_once(__DIR__ . '/../ViewHelperBaseTestcase.php');
-
 /**
  * Testcase for the external uri view helper
  */