[TASK] Make sysext/extbase/Tests/Unit notice free 21/57221/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 14 Aug 2018 16:47:56 +0000 (18:47 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 14 Aug 2018 17:07:07 +0000 (19:07 +0200)
Releases: master
Resolves: #85264
Change-Id: Iadf459660471c2d0361cee091a83d0e87d7a19fb
Reviewed-on: https://review.typo3.org/57221
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/extbase/Classes/Service/ExtensionService.php
typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php
typo3/sysext/extbase/Tests/Unit/Service/ExtensionServiceTest.php

index 70a0de0..3915ea4 100644 (file)
@@ -98,7 +98,7 @@ class ExtensionService implements \TYPO3\CMS\Core\SingletonInterface
     {
         $frameworkConfiguration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
         // check, whether the current plugin is configured to handle the action
-        if ($extensionName === $frameworkConfiguration['extensionName']) {
+        if (!empty($frameworkConfiguration['extensionName']) && $extensionName === $frameworkConfiguration['extensionName']) {
             if (isset($frameworkConfiguration['controllerConfiguration'][$controllerName]) && in_array($actionName, $frameworkConfiguration['controllerConfiguration'][$controllerName]['actions'])) {
                 return $frameworkConfiguration['pluginName'];
             }
index ea38f95..e19123d 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+declare(strict_types = 1);
 namespace TYPO3\CMS\Extbase\Tests\Unit\Persistence;
 
 /*
@@ -25,11 +26,6 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 class RepositoryTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * @var \TYPO3\CMS\Extbase\Persistence\Repository|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface
      */
     protected $repository;
index cf4a34e..21d1675 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+declare(strict_types = 1);
 namespace TYPO3\CMS\Extbase\Tests\Unit\Service;
 
 /*
@@ -23,18 +24,14 @@ use TYPO3\CMS\Core\Database\Query\QueryBuilder;
 use TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Exception;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
  * Test case
  */
-class ExtensionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class ExtensionServiceTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
      */
     protected $mockConfigurationManager;