[TASK] Disable scheduler-tests if EXT:scheduler not loaded 33/23133/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Fri, 16 Aug 2013 11:53:27 +0000 (13:53 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 16 Aug 2013 12:19:30 +0000 (14:19 +0200)
Change-Id: I62ec38fc27330e74c4bc3eed6ded3a2f4a6de550
Resolves: #51115
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/23133
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/extbase/Tests/Unit/Scheduler/FieldProviderTest.php
typo3/sysext/extbase/Tests/Unit/Scheduler/TaskExecuterTest.php
typo3/sysext/extbase/Tests/Unit/Scheduler/TaskTest.php

index a023bc1..bad03b7 100644 (file)
@@ -67,6 +67,9 @@ class FieldProviderTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
        protected $fieldProvider;
 
        public function setUp() {
+               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('scheduler')) {
+                       $this->markTestSkipped('Tests need EXT:scheduler loaded.');
+               }
                $this->objectManager = $this->getMock('TYPO3\CMS\Extbase\Object\ObjectManager', array('dummy'));
                $this->commandManager = $this->getMock('TYPO3\CMS\Extbase\Mvc\Cli\CommandManager', array('getAvailableCommands'));
 
index 38bf6ba..b40e706 100644 (file)
@@ -65,6 +65,9 @@ class TaskExecutorTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
        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);
index e0c7a6d..3ad5b18 100644 (file)
@@ -45,6 +45,9 @@ class TaskTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
        protected $taskExecutor;
 
        public function setUp() {
+               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('scheduler')) {
+                       $this->markTestSkipped('Tests need EXT:scheduler loaded.');
+               }
                $this->taskExecutor = $this->getMock('TYPO3\\CMS\\Extbase\\Scheduler\\TaskExecutor', array('execute'));
                $this->task = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Scheduler\\Task', array('logException'), array(), '', FALSE);
                $this->task->_set('objectManager', \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager'));