[TASK] Make core/Tests/Unit/Configuration/ notice free 65/57065/5
authorJan Helke <typo3@helke.de>
Mon, 28 May 2018 11:55:01 +0000 (13:55 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 9 Jun 2018 19:25:22 +0000 (21:25 +0200)
Releases: master
Resolves: #85094
Change-Id: I7fe8e2dd15fa797eef9b153bf2935187181149ae
Reviewed-on: https://review.typo3.org/57065
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/Configuration/AbstractConfigurationManager.php
typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php
typo3/sysext/extbase/Tests/Unit/Configuration/AbstractConfigurationManagerTest.php
typo3/sysext/extbase/Tests/Unit/Configuration/FrontendConfigurationManagerTest.php

index 3dfa281..f90e693 100644 (file)
@@ -241,7 +241,7 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
                 continue;
             }
             $overriddenSwitchableControllerActions[$controllerName] = ['actions' => $actions];
-            $nonCacheableActions = $frameworkConfiguration['controllerConfiguration'][$controllerName]['nonCacheableActions'];
+            $nonCacheableActions = $frameworkConfiguration['controllerConfiguration'][$controllerName]['nonCacheableActions'] ?? null;
             if (!is_array($nonCacheableActions)) {
                 // There are no non-cacheable actions, thus we can directly continue
                 // with the next controller name.
index 51c6002..0326121 100644 (file)
@@ -59,12 +59,12 @@ class FrontendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abst
     {
         $setup = $this->getTypoScriptSetup();
         $pluginConfiguration = [];
-        if (is_array($setup['plugin.']['tx_' . strtolower($extensionName) . '.'])) {
+        if (isset($setup['plugin.']['tx_' . strtolower($extensionName) . '.']) && is_array($setup['plugin.']['tx_' . strtolower($extensionName) . '.'])) {
             $pluginConfiguration = $this->typoScriptService->convertTypoScriptArrayToPlainArray($setup['plugin.']['tx_' . strtolower($extensionName) . '.']);
         }
         if ($pluginName !== null) {
             $pluginSignature = strtolower($extensionName . '_' . $pluginName);
-            if (is_array($setup['plugin.']['tx_' . $pluginSignature . '.'])) {
+            if (isset($setup['plugin.']['tx_' . $pluginSignature . '.']) && is_array($setup['plugin.']['tx_' . $pluginSignature . '.'])) {
                 ArrayUtility::mergeRecursiveWithOverrule(
                     $pluginConfiguration,
                     $this->typoScriptService->convertTypoScriptArrayToPlainArray($setup['plugin.']['tx_' . $pluginSignature . '.'])
@@ -199,8 +199,8 @@ class FrontendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abst
      */
     protected function mergeConfigurationIntoFrameworkConfiguration(array $frameworkConfiguration, array $configuration, $configurationPartName)
     {
-        if (is_array($configuration[$configurationPartName])) {
-            if (is_array($frameworkConfiguration[$configurationPartName])) {
+        if (isset($configuration[$configurationPartName]) && is_array($configuration[$configurationPartName])) {
+            if (isset($frameworkConfiguration[$configurationPartName]) && is_array($frameworkConfiguration[$configurationPartName])) {
                 ArrayUtility::mergeRecursiveWithOverrule($frameworkConfiguration[$configurationPartName], $configuration[$configurationPartName]);
             } else {
                 $frameworkConfiguration[$configurationPartName] = $configuration[$configurationPartName];
index f8e3b15..44d8d8c 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+declare(strict_types = 1);
+
 namespace TYPO3\CMS\Extbase\Tests\Unit\Configuration;
 
 /*
@@ -14,23 +16,24 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Configuration;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\TypoScript\TypoScriptService;
+use TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
+use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
 /**
  * Test case
  */
-class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class AbstractConfigurationManagerTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface
+     * @var AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|AccessibleObjectInterface
      */
     protected $abstractConfigurationManager;
 
     /**
-     * @var \TYPO3\CMS\Core\TypoScript\TypoScriptService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface
+     * @var TypoScriptService|\PHPUnit_Framework_MockObject_MockObject|AccessibleObjectInterface
      */
     protected $mockTypoScriptService;
 
@@ -115,17 +118,26 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * Sets up this testcase
      */
-    protected function setUp()
+    protected function setUp(): void
     {
-        $this->abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::class, ['getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids']);
-        $this->mockTypoScriptService = $this->getAccessibleMock(\TYPO3\CMS\Core\TypoScript\TypoScriptService::class);
+        $this->abstractConfigurationManager = $this->getAccessibleMock(
+            AbstractConfigurationManager::class,
+            [
+                'getContextSpecificFrameworkConfiguration',
+                'getTypoScriptSetup',
+                'getPluginConfiguration',
+                'getSwitchableControllerActions',
+                'getRecursiveStoragePids'
+            ]
+        );
+        $this->mockTypoScriptService = $this->getAccessibleMock(TypoScriptService::class);
         $this->abstractConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
     }
 
     /**
      * @test
      */
-    public function setConfigurationResetsConfigurationCache()
+    public function setConfigurationResetsConfigurationCache(): void
     {
         $this->abstractConfigurationManager->_set('configurationCache', ['foo' => 'bar']);
         $this->abstractConfigurationManager->setConfiguration([]);
@@ -135,7 +147,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function setConfigurationSetsExtensionAndPluginName()
+    public function setConfigurationSetsExtensionAndPluginName(): void
     {
         $configuration = [
             'extensionName' => 'SomeExtensionName',
@@ -149,7 +161,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function setConfigurationConvertsTypoScriptArrayToPlainArray()
+    public function setConfigurationConvertsTypoScriptArrayToPlainArray(): void
     {
         $configuration = [
             'foo' => 'bar',
@@ -169,11 +181,14 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getConfigurationReturnsCachedResultOfCurrentPlugin()
+    public function getConfigurationReturnsCachedResultOfCurrentPlugin(): void
     {
         $this->abstractConfigurationManager->_set('extensionName', 'CurrentExtensionName');
         $this->abstractConfigurationManager->_set('pluginName', 'CurrentPluginName');
-        $this->abstractConfigurationManager->_set('configurationCache', ['currentextensionname_currentpluginname' => ['foo' => 'bar'], 'someotherextension_somepluginname' => ['baz' => 'shouldnotbereturned']]);
+        $this->abstractConfigurationManager->_set('configurationCache', [
+            'currentextensionname_currentpluginname' => ['foo' => 'bar'],
+            'someotherextension_somepluginname' => ['baz' => 'shouldnotbereturned']
+        ]);
         $expectedResult = ['foo' => 'bar'];
         $actualResult = $this->abstractConfigurationManager->getConfiguration();
         $this->assertEquals($expectedResult, $actualResult);
@@ -182,9 +197,12 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getConfigurationReturnsCachedResultForGivenExtension()
+    public function getConfigurationReturnsCachedResultForGivenExtension(): void
     {
-        $this->abstractConfigurationManager->_set('configurationCache', ['someextensionname_somepluginname' => ['foo' => 'bar'], 'someotherextension_somepluginname' => ['baz' => 'shouldnotbereturned']]);
+        $this->abstractConfigurationManager->_set('configurationCache', [
+            'someextensionname_somepluginname' => ['foo' => 'bar'],
+            'someotherextension_somepluginname' => ['baz' => 'shouldnotbereturned']
+        ]);
         $expectedResult = ['foo' => 'bar'];
         $actualResult = $this->abstractConfigurationManager->getConfiguration('SomeExtensionName', 'SomePluginName');
         $this->assertEquals($expectedResult, $actualResult);
@@ -193,13 +211,16 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getConfigurationRecursivelyMergesCurrentPluginConfigurationWithFrameworkConfiguration()
+    public function getConfigurationRecursivelyMergesCurrentPluginConfigurationWithFrameworkConfiguration(): void
     {
         $this->abstractConfigurationManager->_set('extensionName', 'CurrentExtensionName');
         $this->abstractConfigurationManager->_set('pluginName', 'CurrentPluginName');
         $this->abstractConfigurationManager->expects($this->once())->method('getTypoScriptSetup')->will($this->returnValue($this->testTypoScriptSetup));
         $this->mockTypoScriptService->expects($this->atLeastOnce())->method('convertTypoScriptArrayToPlainArray')->with($this->testTypoScriptSetup['config.']['tx_extbase.'])->will($this->returnValue($this->testTypoScriptSetupConverted['config']['tx_extbase']));
-        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
+        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testPluginConfiguration));
         $expectedResult = [
             'settings' => [
                 'setting1' => 'overriddenValue1',
@@ -226,10 +247,13 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getConfigurationRecursivelyMergesPluginConfigurationOfSpecifiedPluginWithFrameworkConfiguration()
-    {
+    public function getConfigurationRecursivelyMergesPluginConfigurationOfSpecifiedPluginWithFrameworkConfiguration(
+    ): void {
         $this->abstractConfigurationManager->expects($this->once())->method('getTypoScriptSetup')->will($this->returnValue($this->testTypoScriptSetup));
-        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('SomeExtensionName', 'SomePluginName')->will($this->returnValue($this->testPluginConfiguration));
+        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with(
+            'SomeExtensionName',
+            'SomePluginName'
+        )->will($this->returnValue($this->testPluginConfiguration));
         $this->mockTypoScriptService->expects($this->atLeastOnce())->method('convertTypoScriptArrayToPlainArray')->with($this->testTypoScriptSetup['config.']['tx_extbase.'])->will($this->returnValue($this->testTypoScriptSetupConverted['config']['tx_extbase']));
         $expectedResult = [
             'settings' => [
@@ -257,8 +281,8 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getConfigurationDoesNotOverrideConfigurationWithContextSpecificFrameworkConfigurationIfDifferentPluginIsSpecified()
-    {
+    public function getConfigurationDoesNotOverrideConfigurationWithContextSpecificFrameworkConfigurationIfDifferentPluginIsSpecified(
+    ): void {
         $this->abstractConfigurationManager->expects($this->never())->method('getContextSpecificFrameworkConfiguration');
         $this->abstractConfigurationManager->getConfiguration('SomeExtensionName', 'SomePluginName');
     }
@@ -266,8 +290,8 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getConfigurationOverridesConfigurationWithContextSpecificFrameworkConfigurationIfNoPluginWasSpecified()
-    {
+    public function getConfigurationOverridesConfigurationWithContextSpecificFrameworkConfigurationIfNoPluginWasSpecified(
+    ): void {
         $this->abstractConfigurationManager->expects($this->once())->method('getTypoScriptSetup')->will($this->returnValue($this->testTypoScriptSetup));
         $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with()->will($this->returnValue($this->testPluginConfiguration));
         $contextSpecifixFrameworkConfiguration = [
@@ -284,12 +308,15 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getConfigurationOverridesConfigurationWithContextSpecificFrameworkConfigurationIfSpecifiedPluginIsTheCurrentPlugin()
-    {
+    public function getConfigurationOverridesConfigurationWithContextSpecificFrameworkConfigurationIfSpecifiedPluginIsTheCurrentPlugin(
+    ): void {
         $this->abstractConfigurationManager->_set('extensionName', 'CurrentExtensionName');
         $this->abstractConfigurationManager->_set('pluginName', 'CurrentPluginName');
         $this->abstractConfigurationManager->expects($this->once())->method('getTypoScriptSetup')->will($this->returnValue($this->testTypoScriptSetup));
-        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
+        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testPluginConfiguration));
         $contextSpecifixFrameworkConfiguration = [
             'context' => [
                 'specific' => 'framwork',
@@ -297,21 +324,27 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
             ]
         ];
         $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnValue($contextSpecifixFrameworkConfiguration));
-        $actualResult = $this->abstractConfigurationManager->getConfiguration('CurrentExtensionName', 'CurrentPluginName');
+        $actualResult = $this->abstractConfigurationManager->getConfiguration(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        );
         $this->assertEquals($contextSpecifixFrameworkConfiguration, $actualResult);
     }
 
     /**
      * @test
      */
-    public function getConfigurationStoresResultInConfigurationCache()
+    public function getConfigurationStoresResultInConfigurationCache(): void
     {
         $this->abstractConfigurationManager->_set('extensionName', 'CurrentExtensionName');
         $this->abstractConfigurationManager->_set('pluginName', 'CurrentPluginName');
         $this->abstractConfigurationManager->expects($this->any())->method('getPluginConfiguration')->will($this->returnValue(['foo' => 'bar']));
         $this->abstractConfigurationManager->getConfiguration();
         $this->abstractConfigurationManager->getConfiguration('SomeOtherExtensionName', 'SomeOtherCurrentPluginName');
-        $expectedResult = ['currentextensionname_currentpluginname', 'someotherextensionname_someothercurrentpluginname'];
+        $expectedResult = [
+            'currentextensionname_currentpluginname',
+            'someotherextensionname_someothercurrentpluginname'
+        ];
         $actualResult = array_keys($this->abstractConfigurationManager->_get('configurationCache'));
         $this->assertEquals($expectedResult, $actualResult);
     }
@@ -319,8 +352,8 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getConfigurationRetrievesStoragePidIncludingGivenStoragePidWithRecursiveSetForSingleStoragePid()
-    {
+    public function getConfigurationRetrievesStoragePidIncludingGivenStoragePidWithRecursiveSetForSingleStoragePid(
+    ): void {
         $pluginConfiguration = [
             'persistence' => [
                 'storagePid' => 1,
@@ -335,8 +368,8 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getConfigurationRetrievesStoragePidIncludingGivenStoragePidWithRecursiveSetForMultipleStoragePid()
-    {
+    public function getConfigurationRetrievesStoragePidIncludingGivenStoragePidWithRecursiveSetForMultipleStoragePid(
+    ): void {
         $pluginConfiguration = [
             'persistence' => [
                 'storagePid' => '1,25',
@@ -354,10 +387,20 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function switchableControllerActionsAreNotOverriddenIfPluginNameIsSpecified()
+    public function switchableControllerActionsAreNotOverriddenIfPluginNameIsSpecified(): void
     {
-        /** @var \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface */
-        $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::class, ['overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids']);
+        /** @var AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|AccessibleObjectInterface $abstractConfigurationManager */
+        $abstractConfigurationManager = $this->getAccessibleMock(
+            AbstractConfigurationManager::class,
+            [
+                'overrideSwitchableControllerActions',
+                'getContextSpecificFrameworkConfiguration',
+                'getTypoScriptSetup',
+                'getPluginConfiguration',
+                'getSwitchableControllerActions',
+                'getRecursiveStoragePids'
+            ]
+        );
         $abstractConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
         $abstractConfigurationManager->setConfiguration(['switchableControllerActions' => ['overriddenSwitchableControllerActions']]);
         $abstractConfigurationManager->expects($this->any())->method('getPluginConfiguration')->will($this->returnValue([]));
@@ -368,11 +411,25 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function switchableControllerActionsAreOverriddenIfSpecifiedPluginIsTheCurrentPlugin()
+    public function switchableControllerActionsAreOverriddenIfSpecifiedPluginIsTheCurrentPlugin(): void
     {
-        /** @var \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface */
-        $configuration = ['extensionName' => 'CurrentExtensionName', 'pluginName' => 'CurrentPluginName', 'switchableControllerActions' => ['overriddenSwitchableControllerActions']];
-        $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::class, ['overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids']);
+        /** @var AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|AccessibleObjectInterface $abstractConfigurationManager */
+        $configuration = [
+            'extensionName' => 'CurrentExtensionName',
+            'pluginName' => 'CurrentPluginName',
+            'switchableControllerActions' => ['overriddenSwitchableControllerActions']
+        ];
+        $abstractConfigurationManager = $this->getAccessibleMock(
+            AbstractConfigurationManager::class,
+            [
+                'overrideSwitchableControllerActions',
+                'getContextSpecificFrameworkConfiguration',
+                'getTypoScriptSetup',
+                'getPluginConfiguration',
+                'getSwitchableControllerActions',
+                'getRecursiveStoragePids'
+            ]
+        );
         $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
         $abstractConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
         $abstractConfigurationManager->setConfiguration($configuration);
@@ -384,11 +441,21 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function switchableControllerActionsAreOverriddenIfPluginNameIsNotSpecified()
+    public function switchableControllerActionsAreOverriddenIfPluginNameIsNotSpecified(): void
     {
-        /** @var \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface */
+        /** @var AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|AccessibleObjectInterface $abstractConfigurationManager */
         $configuration = ['switchableControllerActions' => ['overriddenSwitchableControllerActions']];
-        $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::class, ['overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids']);
+        $abstractConfigurationManager = $this->getAccessibleMock(
+            AbstractConfigurationManager::class,
+            [
+                'overrideSwitchableControllerActions',
+                'getContextSpecificFrameworkConfiguration',
+                'getTypoScriptSetup',
+                'getPluginConfiguration',
+                'getSwitchableControllerActions',
+                'getRecursiveStoragePids'
+            ]
+        );
         $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
         $abstractConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
         $abstractConfigurationManager->setConfiguration($configuration);
@@ -400,7 +467,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function orderOfActionsCanBeOverriddenForCurrentPlugin()
+    public function orderOfActionsCanBeOverriddenForCurrentPlugin(): void
     {
         $configuration = [
             'extensionName' => 'CurrentExtensionName',
@@ -411,9 +478,17 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
         ];
         $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
         $this->abstractConfigurationManager->setConfiguration($configuration);
-        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
-        $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
-        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallback(function ($a) {
+        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testPluginConfiguration));
+        $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testSwitchableControllerActions));
+        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallback(function (
+            $a
+        ) {
             return $a;
         }));
         $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
@@ -429,7 +504,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function newActionsCanBeAddedForCurrentPlugin()
+    public function newActionsCanBeAddedForCurrentPlugin(): void
     {
         $configuration = [
             'extensionName' => 'CurrentExtensionName',
@@ -440,9 +515,17 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
         ];
         $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
         $this->abstractConfigurationManager->setConfiguration($configuration);
-        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
-        $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
-        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallback(function ($a) {
+        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testPluginConfiguration));
+        $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testSwitchableControllerActions));
+        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallback(function (
+            $a
+        ) {
             return $a;
         }));
         $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
@@ -458,7 +541,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function controllersCanNotBeOverridden()
+    public function controllersCanNotBeOverridden(): void
     {
         $configuration = [
             'extensionName' => 'CurrentExtensionName',
@@ -469,9 +552,17 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
         ];
         $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
         $this->abstractConfigurationManager->setConfiguration($configuration);
-        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
-        $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
-        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallback(function ($a) {
+        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testPluginConfiguration));
+        $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testSwitchableControllerActions));
+        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallback(function (
+            $a
+        ) {
             return $a;
         }));
         $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
@@ -483,7 +574,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function cachingOfActionsCanNotBeChanged()
+    public function cachingOfActionsCanNotBeChanged(): void
     {
         $configuration = [
             'extensionName' => 'CurrentExtensionName',
@@ -495,9 +586,17 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
         ];
         $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
         $this->abstractConfigurationManager->setConfiguration($configuration);
-        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
-        $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
-        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallback(function ($a) {
+        $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testPluginConfiguration));
+        $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with(
+            'CurrentExtensionName',
+            'CurrentPluginName'
+        )->will($this->returnValue($this->testSwitchableControllerActions));
+        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallback(function (
+            $a
+        ) {
             return $a;
         }));
         $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
@@ -517,7 +616,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getContentObjectReturnsNullIfNoContentObjectHasBeenSet()
+    public function getContentObjectReturnsNullIfNoContentObjectHasBeenSet(): void
     {
         $this->assertNull($this->abstractConfigurationManager->getContentObject());
     }
@@ -525,9 +624,10 @@ class AbstractConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getContentObjectTheCurrentContentObject()
+    public function getContentObjectTheCurrentContentObject(): void
     {
-        $mockContentObject = $this->createMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        /** @var ContentObjectRenderer|\PHPUnit_Framework_MockObject_MockObject $mockContentObject */
+        $mockContentObject = $this->createMock(ContentObjectRenderer::class);
         $this->abstractConfigurationManager->setContentObject($mockContentObject);
         $this->assertSame($this->abstractConfigurationManager->getContentObject(), $mockContentObject);
     }
index ec01340..9f51f37 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+declare(strict_types = 1);
+
 namespace TYPO3\CMS\Extbase\Tests\Unit\Configuration;
 
 /*
@@ -13,53 +15,54 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Configuration;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Core\TypoScript\TypoScriptService;
 use TYPO3\CMS\Extbase\Configuration\Exception\ParseErrorException;
+use TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager;
+use TYPO3\CMS\Extbase\Service\FlexFormService;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
+use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
  * Test case
  */
-class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class FrontendConfigurationManagerTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
-     * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer|\PHPUnit_Framework_MockObject_MockObject
+     * @var ContentObjectRenderer|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $mockContentObject;
 
     /**
-     * @var \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface
+     * @var FrontendConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|AccessibleObjectInterface
      */
     protected $frontendConfigurationManager;
 
     /**
-     * @var \TYPO3\CMS\Core\TypoScript\TypoScriptService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface
+     * @var TypoScriptService|\PHPUnit_Framework_MockObject_MockObject|AccessibleObjectInterface
      */
     protected $mockTypoScriptService;
 
     /**
      * Sets up this testcase
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $GLOBALS['TSFE'] = new \stdClass();
         $GLOBALS['TSFE']->tmpl = new \stdClass();
-        $this->mockContentObject = $this->getMockBuilder(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class)
+        $this->mockContentObject = $this->getMockBuilder(ContentObjectRenderer::class)
             ->setMethods(['getTreeList'])
             ->getMock();
-        $this->frontendConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, ['dummy']);
+        $this->frontendConfigurationManager = $this->getAccessibleMock(FrontendConfigurationManager::class, ['dummy']);
         $this->frontendConfigurationManager->_set('contentObject', $this->mockContentObject);
-        $this->mockTypoScriptService = $this->getAccessibleMock(\TYPO3\CMS\Core\TypoScript\TypoScriptService::class);
+        $this->mockTypoScriptService = $this->getAccessibleMock(TypoScriptService::class);
         $this->frontendConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
     }
 
     /**
      * @test
      */
-    public function getTypoScriptSetupReturnsSetupFromTsfe()
+    public function getTypoScriptSetupReturnsSetupFromTsfe(): void
     {
         $GLOBALS['TSFE']->tmpl->setup = ['foo' => 'bar'];
         $this->assertEquals(['foo' => 'bar'], $this->frontendConfigurationManager->_call('getTypoScriptSetup'));
@@ -68,18 +71,22 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getPluginConfigurationReturnsEmptyArrayIfNoPluginConfigurationWasFound()
+    public function getPluginConfigurationReturnsEmptyArrayIfNoPluginConfigurationWasFound(): void
     {
         $GLOBALS['TSFE']->tmpl->setup = ['foo' => 'bar'];
         $expectedResult = [];
-        $actualResult = $this->frontendConfigurationManager->_call('getPluginConfiguration', 'SomeExtensionName', 'SomePluginName');
+        $actualResult = $this->frontendConfigurationManager->_call(
+            'getPluginConfiguration',
+            'SomeExtensionName',
+            'SomePluginName'
+        );
         $this->assertEquals($expectedResult, $actualResult);
     }
 
     /**
      * @test
      */
-    public function getPluginConfigurationReturnsExtensionConfiguration()
+    public function getPluginConfigurationReturnsExtensionConfiguration(): void
     {
         $testSettings = [
             'settings.' => [
@@ -110,7 +117,7 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function getPluginConfigurationReturnsPluginConfiguration()
+    public function getPluginConfigurationReturnsPluginConfiguration(): void
     {
         $testSettings = [
             'settings.' => [
@@ -134,14 +141,18 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
                 'foo' => 'bar'
             ]
         ];
-        $actualResult = $this->frontendConfigurationManager->_call('getPluginConfiguration', 'SomeExtensionName', 'SomePluginName');
+        $actualResult = $this->frontendConfigurationManager->_call(
+            'getPluginConfiguration',
+            'SomeExtensionName',
+            'SomePluginName'
+        );
         $this->assertEquals($expectedResult, $actualResult);
     }
 
     /**
      * @test
      */
-    public function getPluginConfigurationRecursivelyMergesExtensionAndPluginConfiguration()
+    public function getPluginConfigurationRecursivelyMergesExtensionAndPluginConfiguration(): void
     {
         $testExtensionSettings = [
             'settings.' => [
@@ -193,25 +204,33 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
                 ]
             ]
         ];
-        $actualResult = $this->frontendConfigurationManager->_call('getPluginConfiguration', 'SomeExtensionName', 'SomePluginName');
+        $actualResult = $this->frontendConfigurationManager->_call(
+            'getPluginConfiguration',
+            'SomeExtensionName',
+            'SomePluginName'
+        );
         $this->assertEquals($expectedResult, $actualResult);
     }
 
     /**
      * @test
      */
-    public function getSwitchableControllerActionsReturnsEmptyArrayByDefault()
+    public function getSwitchableControllerActionsReturnsEmptyArrayByDefault(): void
     {
         $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase'] = null;
         $expectedResult = [];
-        $actualResult = $this->frontendConfigurationManager->_call('getSwitchableControllerActions', 'SomeExtensionName', 'SomePluginName');
+        $actualResult = $this->frontendConfigurationManager->_call(
+            'getSwitchableControllerActions',
+            'SomeExtensionName',
+            'SomePluginName'
+        );
         $this->assertEquals($expectedResult, $actualResult);
     }
 
     /**
      * @test
      */
-    public function getSwitchableControllerActionsReturnsConfigurationStoredInExtconf()
+    public function getSwitchableControllerActionsReturnsConfigurationStoredInExtconf(): void
     {
         $testSwitchableControllerActions = [
             'Controller1' => [
@@ -232,15 +251,19 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
         ];
         $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['SomeExtensionName']['plugins']['SomePluginName']['controllers'] = $testSwitchableControllerActions;
         $expectedResult = $testSwitchableControllerActions;
-        $actualResult = $this->frontendConfigurationManager->_call('getSwitchableControllerActions', 'SomeExtensionName', 'SomePluginName');
+        $actualResult = $this->frontendConfigurationManager->_call(
+            'getSwitchableControllerActions',
+            'SomeExtensionName',
+            'SomePluginName'
+        );
         $this->assertEquals($expectedResult, $actualResult);
     }
 
     /**
      * @test
      */
-    public function overrideSwitchableControllerActionsFromFlexFormReturnsUnchangedFrameworkConfigurationIfNoFlexFormConfigurationIsFound()
-    {
+    public function overrideSwitchableControllerActionsFromFlexFormReturnsUnchangedFrameworkConfigurationIfNoFlexFormConfigurationIsFound(
+    ): void {
         $frameworkConfiguration = [
             'pluginName' => 'Pi1',
             'extensionName' => 'SomeExtension',
@@ -257,14 +280,18 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
             ]
         ];
         $flexFormConfiguration = [];
-        $actualResult = $this->frontendConfigurationManager->_call('overrideSwitchableControllerActionsFromFlexForm', $frameworkConfiguration, $flexFormConfiguration);
+        $actualResult = $this->frontendConfigurationManager->_call(
+            'overrideSwitchableControllerActionsFromFlexForm',
+            $frameworkConfiguration,
+            $flexFormConfiguration
+        );
         $this->assertSame($frameworkConfiguration, $actualResult);
     }
 
     /**
      * @test
      */
-    public function overrideSwitchableControllerActionsFromFlexFormMergesNonCacheableActions()
+    public function overrideSwitchableControllerActionsFromFlexFormMergesNonCacheableActions(): void
     {
         $frameworkConfiguration = [
             'pluginName' => 'Pi1',
@@ -295,14 +322,18 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
                 ]
             ]
         ];
-        $actualResult = $this->frontendConfigurationManager->_call('overrideSwitchableControllerActionsFromFlexForm', $frameworkConfiguration, $flexFormConfiguration);
+        $actualResult = $this->frontendConfigurationManager->_call(
+            'overrideSwitchableControllerActionsFromFlexForm',
+            $frameworkConfiguration,
+            $flexFormConfiguration
+        );
         $this->assertEquals($expectedResult, $actualResult);
     }
 
     /**
      * @test
      */
-    public function overrideSwitchableControllerActionsThrowsExceptionIfFlexFormConfigurationIsInvalid()
+    public function overrideSwitchableControllerActionsThrowsExceptionIfFlexFormConfigurationIsInvalid(): void
     {
         $this->expectException(ParseErrorException::class);
         $this->expectExceptionCode(1257146403);
@@ -322,40 +353,57 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
         $flexFormConfiguration = [
             'switchableControllerActions' => 'Controller1->;Controller2->action3;Controller2->action1'
         ];
-        $this->frontendConfigurationManager->_call('overrideSwitchableControllerActionsFromFlexForm', $frameworkConfiguration, $flexFormConfiguration);
+        $this->frontendConfigurationManager->_call(
+            'overrideSwitchableControllerActionsFromFlexForm',
+            $frameworkConfiguration,
+            $flexFormConfiguration
+        );
     }
 
     /**
      * @test
      */
-    public function getContextSpecificFrameworkConfigurationCorrectlyCallsOverrideMethods()
+    public function getContextSpecificFrameworkConfigurationCorrectlyCallsOverrideMethods(): void
     {
         $frameworkConfiguration = [
             'some' => [
                 'framework' => 'configuration'
             ]
         ];
-        /** @var \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface */
-        $frontendConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, ['overrideStoragePidIfStartingPointIsSet', 'overrideConfigurationFromPlugin', 'overrideConfigurationFromFlexForm']);
+        /** @var FrontendConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|AccessibleObjectInterface */
+        $frontendConfigurationManager = $this->getAccessibleMock(FrontendConfigurationManager::class, [
+            'overrideStoragePidIfStartingPointIsSet',
+            'overrideConfigurationFromPlugin',
+            'overrideConfigurationFromFlexForm'
+        ]);
         $frontendConfigurationManager->expects($this->at(0))->method('overrideStoragePidIfStartingPointIsSet')->with($frameworkConfiguration)->will($this->returnValue(['overridden' => 'storagePid']));
         $frontendConfigurationManager->expects($this->at(1))->method('overrideConfigurationFromPlugin')->with(['overridden' => 'storagePid'])->will($this->returnValue(['overridden' => 'pluginConfiguration']));
         $frontendConfigurationManager->expects($this->at(2))->method('overrideConfigurationFromFlexForm')->with(['overridden' => 'pluginConfiguration'])->will($this->returnValue(['overridden' => 'flexFormConfiguration']));
         $expectedResult = ['overridden' => 'flexFormConfiguration'];
-        $actualResult = $frontendConfigurationManager->_call('getContextSpecificFrameworkConfiguration', $frameworkConfiguration);
+        $actualResult = $frontendConfigurationManager->_call(
+            'getContextSpecificFrameworkConfiguration',
+            $frameworkConfiguration
+        );
         $this->assertEquals($expectedResult, $actualResult);
     }
 
     /**
      * @test
      */
-    public function storagePidsAreExtendedIfRecursiveSearchIsConfigured()
+    public function storagePidsAreExtendedIfRecursiveSearchIsConfigured(): void
     {
         $storagePid = '3,5,9';
         $recursive = 99;
-        /** @var $abstractConfigurationManager \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager */
-        $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, ['overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions']);
-        /** @var $cObjectMock \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
-        $cObjectMock = $this->createMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        /** @var $abstractConfigurationManager FrontendConfigurationManager */
+        $abstractConfigurationManager = $this->getAccessibleMock(FrontendConfigurationManager::class, [
+            'overrideSwitchableControllerActions',
+            'getContextSpecificFrameworkConfiguration',
+            'getTypoScriptSetup',
+            'getPluginConfiguration',
+            'getSwitchableControllerActions'
+        ]);
+        /** @var $cObjectMock ContentObjectRenderer */
+        $cObjectMock = $this->createMock(ContentObjectRenderer::class);
         $cObjectMock->expects($this->any())
             ->method('getTreeList')
             ->will($this->onConsecutiveCalls('4', '', '898,12'));
@@ -369,14 +417,20 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function storagePidsAreExtendedIfRecursiveSearchIsConfiguredAndWithPidIncludedForNegativePid()
+    public function storagePidsAreExtendedIfRecursiveSearchIsConfiguredAndWithPidIncludedForNegativePid(): void
     {
         $storagePid = '-3,5,9';
         $recursive = 99;
-        /** @var $abstractConfigurationManager \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager */
-        $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, ['overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions']);
-        /** @var $cObjectMock \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
-        $cObjectMock = $this->createMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        /** @var $abstractConfigurationManager FrontendConfigurationManager */
+        $abstractConfigurationManager = $this->getAccessibleMock(FrontendConfigurationManager::class, [
+            'overrideSwitchableControllerActions',
+            'getContextSpecificFrameworkConfiguration',
+            'getTypoScriptSetup',
+            'getPluginConfiguration',
+            'getSwitchableControllerActions'
+        ]);
+        /** @var $cObjectMock ContentObjectRenderer */
+        $cObjectMock = $this->createMock(ContentObjectRenderer::class);
         $cObjectMock->expects($this->any())
             ->method('getTreeList')
             ->will($this->onConsecutiveCalls('3,4', '', '898,12'));
@@ -390,14 +444,20 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function storagePidsAreNotExtendedIfRecursiveSearchIsNotConfigured()
+    public function storagePidsAreNotExtendedIfRecursiveSearchIsNotConfigured(): void
     {
         $storagePid = '1,2,3';
 
-        /** @var $abstractConfigurationManager \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager */
-        $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, ['overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions']);
-        /** @var $cObjectMock \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
-        $cObjectMock = $this->createMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        /** @var $abstractConfigurationManager FrontendConfigurationManager */
+        $abstractConfigurationManager = $this->getAccessibleMock(FrontendConfigurationManager::class, [
+            'overrideSwitchableControllerActions',
+            'getContextSpecificFrameworkConfiguration',
+            'getTypoScriptSetup',
+            'getPluginConfiguration',
+            'getSwitchableControllerActions'
+        ]);
+        /** @var $cObjectMock ContentObjectRenderer */
+        $cObjectMock = $this->createMock(ContentObjectRenderer::class);
         $cObjectMock->expects($this->never())->method('getTreeList');
         $abstractConfigurationManager->setContentObject($cObjectMock);
 
@@ -409,15 +469,21 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function storagePidsAreNotExtendedIfRecursiveSearchIsConfiguredForZeroLevels()
+    public function storagePidsAreNotExtendedIfRecursiveSearchIsConfiguredForZeroLevels(): void
     {
         $storagePid = '1,2,3';
         $recursive = 0;
 
-        $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, ['overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions']);
+        $abstractConfigurationManager = $this->getAccessibleMock(FrontendConfigurationManager::class, [
+            'overrideSwitchableControllerActions',
+            'getContextSpecificFrameworkConfiguration',
+            'getTypoScriptSetup',
+            'getPluginConfiguration',
+            'getSwitchableControllerActions'
+        ]);
 
-        /** @var $cObjectMock \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
-        $cObjectMock = $this->createMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        /** @var $cObjectMock ContentObjectRenderer */
+        $cObjectMock = $this->createMock(ContentObjectRenderer::class);
         $cObjectMock->expects($this->never())->method('getTreeList');
         $abstractConfigurationManager->setContentObject($cObjectMock);
 
@@ -429,7 +495,7 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function mergeConfigurationIntoFrameworkConfigurationWorksAsExpected()
+    public function mergeConfigurationIntoFrameworkConfigurationWorksAsExpected(): void
     {
         $configuration = [
             'persistence' => [
@@ -440,14 +506,19 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
         $frameworkConfiguration = ['persistence' => ['storagePid' => '98']];
         $this->assertSame(
             ['persistence' => ['storagePid' => '0,1,2,3']],
-            $this->frontendConfigurationManager->_call('mergeConfigurationIntoFrameworkConfiguration', $frameworkConfiguration, $configuration, 'persistence')
+            $this->frontendConfigurationManager->_call(
+                'mergeConfigurationIntoFrameworkConfiguration',
+                $frameworkConfiguration,
+                $configuration,
+                'persistence'
+            )
         );
     }
 
     /**
      * @test
      */
-    public function overrideStoragePidIfStartingPointIsSetOverridesCorrectly()
+    public function overrideStoragePidIfStartingPointIsSetOverridesCorrectly(): void
     {
         $this->mockContentObject->expects($this->any())->method('getTreeList')->will($this->returnValue('1,2,3'));
         $this->mockContentObject->data = ['pages' => '0', 'recursive' => 1];
@@ -455,14 +526,17 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
         $frameworkConfiguration = ['persistence' => ['storagePid' => '98']];
         $this->assertSame(
             ['persistence' => ['storagePid' => '0,1,2,3']],
-            $this->frontendConfigurationManager->_call('overrideStoragePidIfStartingPointIsSet', $frameworkConfiguration)
+            $this->frontendConfigurationManager->_call(
+                'overrideStoragePidIfStartingPointIsSet',
+                $frameworkConfiguration
+            )
         );
     }
 
     /**
      * @test
      */
-    public function overrideStoragePidIfStartingPointIsSetCorrectlyHandlesEmptyValuesFromGetTreeList()
+    public function overrideStoragePidIfStartingPointIsSetCorrectlyHandlesEmptyValuesFromGetTreeList(): void
     {
         $this->mockContentObject->expects($this->any())->method('getTreeList')->will($this->returnValue(''));
         $this->mockContentObject->data = ['pages' => '0', 'recursive' => 1];
@@ -470,17 +544,20 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
         $frameworkConfiguration = ['persistence' => ['storagePid' => '98']];
         $this->assertSame(
             ['persistence' => ['storagePid' => '0']],
-            $this->frontendConfigurationManager->_call('overrideStoragePidIfStartingPointIsSet', $frameworkConfiguration)
+            $this->frontendConfigurationManager->_call(
+                'overrideStoragePidIfStartingPointIsSet',
+                $frameworkConfiguration
+            )
         );
     }
 
     /**
      * @test
      */
-    public function overrideConfigurationFromFlexFormChecksForDataIsString()
+    public function overrideConfigurationFromFlexFormChecksForDataIsString(): void
     {
-        /** @var $flexFormService \TYPO3\CMS\Extbase\Service\FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
-        $flexFormService = $this->getMockBuilder(\TYPO3\CMS\Extbase\Service\FlexFormService::class)
+        /** @var $flexFormService FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
+        $flexFormService = $this->getMockBuilder(FlexFormService::class)
             ->setMethods(['convertFlexFormContentToArray'])
             ->getMock();
         $flexFormService->expects($this->once())->method('convertFlexFormContentToArray')->will($this->returnValue([
@@ -502,10 +579,10 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function overrideConfigurationFromFlexFormChecksForDataIsStringAndEmpty()
+    public function overrideConfigurationFromFlexFormChecksForDataIsStringAndEmpty(): void
     {
-        /** @var $flexFormService \TYPO3\CMS\Extbase\Service\FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
-        $flexFormService = $this->getMockBuilder(\TYPO3\CMS\Extbase\Service\FlexFormService::class)
+        /** @var $flexFormService FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
+        $flexFormService = $this->getMockBuilder(FlexFormService::class)
             ->setMethods(['convertFlexFormContentToArray'])
             ->getMock();
         $flexFormService->expects($this->never())->method('convertFlexFormContentToArray');
@@ -523,10 +600,10 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function overrideConfigurationFromFlexFormChecksForDataIsArray()
+    public function overrideConfigurationFromFlexFormChecksForDataIsArray(): void
     {
-        /** @var $flexFormService \TYPO3\CMS\Extbase\Service\FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
-        $flexFormService = $this->getMockBuilder(\TYPO3\CMS\Extbase\Service\FlexFormService::class)
+        /** @var $flexFormService FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
+        $flexFormService = $this->getMockBuilder(FlexFormService::class)
             ->setMethods(['convertFlexFormContentToArray'])
             ->getMock();
         $flexFormService->expects($this->never())->method('convertFlexFormContentToArray');
@@ -544,10 +621,10 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function overrideConfigurationFromFlexFormChecksForDataIsArrayAndEmpty()
+    public function overrideConfigurationFromFlexFormChecksForDataIsArrayAndEmpty(): void
     {
-        /** @var $flexFormService \TYPO3\CMS\Extbase\Service\FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
-        $flexFormService = $this->getMockBuilder(\TYPO3\CMS\Extbase\Service\FlexFormService::class)
+        /** @var $flexFormService FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
+        $flexFormService = $this->getMockBuilder(FlexFormService::class)
             ->setMethods(['convertFlexFormContentToArray'])
             ->getMock();
         $flexFormService->expects($this->never())->method('convertFlexFormContentToArray');
@@ -565,10 +642,13 @@ class FrontendConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit
     /**
      * @test
      */
-    public function overrideConfigurationFromPluginOverridesCorrectly()
+    public function overrideConfigurationFromPluginOverridesCorrectly(): void
     {
-        /** @var $frontendConfigurationManager \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager */
-        $frontendConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, ['getTypoScriptSetup']);
+        /** @var $frontendConfigurationManager FrontendConfigurationManager */
+        $frontendConfigurationManager = $this->getAccessibleMock(
+            FrontendConfigurationManager::class,
+            ['getTypoScriptSetup']
+        );
         $frontendConfigurationManager->_set('contentObject', $this->mockContentObject);
         $frontendConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);