[BUGFIX] Class 'TYPO3\CMS\Scheduler\Task\AbstractTask' not found 54/26954/4
authorStefano Kowalke <blueduck@gmx.net>
Mon, 20 Jan 2014 20:22:29 +0000 (21:22 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 21 Jan 2014 09:29:48 +0000 (10:29 +0100)
When running UnitTests for UpdateExtensionListTask and the extension
Scheduler is not loaded will raise an Fatal error because it tries to
mock TYPO3\CMS\Extensionmanager\Task\UpdateExtensionListTask which
extends from TYPO3\CMS\Scheduler\Task\AbstractTask.

It is necessary to skip the whole test case because every single test
creates a new instance of
\TYPO3\CMS\Extensionmanager\Task\UpdateExtensionListTask().

Releases: 6.2
Resolves: #55192
Change-Id: I81e69c57d58078cf00e4f8e47a1e8d5c7d984177
Reviewed-on: https://review.typo3.org/26954
Reviewed-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/extensionmanager/Tests/Unit/Task/UpdateExtensionListTaskTest.php

index c843e44..19c1cd2 100644 (file)
@@ -45,6 +45,9 @@ class UpdateExtensionListTaskTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTest
         * Set up
         */
        public function setUp() {
         * Set up
         */
        public function setUp() {
+               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('scheduler')) {
+                       $this->markTestSkipped('Tests need EXT:scheduler loaded.');
+               }
                $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
                $this->repositoryHelper = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper', array(), array(), '', FALSE);
        }
                $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
                $this->repositoryHelper = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper', array(), array(), '', FALSE);
        }