[BUGFIX] Incomplete mock in AbstractViewHelperTest 14/54914/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 3 Dec 2017 14:13:29 +0000 (15:13 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 3 Dec 2017 14:29:34 +0000 (15:29 +0100)
Extbase ReflectionService->getMethodParameters() must return
an array, the result is later count()'ed. Properly return an
empty array in one test case.

Change-Id: I8222a3c3d63f2179131fe8cb23499b172b310afd
Resolves: #83201
Releases: 8.7
Reviewed-on: https://review.typo3.org/54914
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php

index d4d420e..8d5b9a1 100644 (file)
@@ -180,6 +180,7 @@ class AbstractViewHelperTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestC
     public function prepareArgumentsCallsInitializeArguments()
     {
         $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, ['render', 'initializeArguments'], [], '', false);
+        $this->mockReflectionService->method('getMethodParameters')->willReturn([]);
         $viewHelper->injectReflectionService($this->mockReflectionService);
 
         $viewHelper->expects($this->once())->method('initializeArguments');