[TASK] Adjust failing test
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 11 Dec 2012 16:44:44 +0000 (17:44 +0100)
committerAlexander Schnitzler <typo3@alexanderschnitzler.de>
Tue, 11 Dec 2012 17:02:26 +0000 (18:02 +0100)
After introduction whitelisting feature a fluid test fails with a Fatal
Error due to changes in the parent class of AbstractWidgetController,
which is the extbase class ActionController.

This Patch fixes the failing test by injecting the needed objects.

Resolves: #43890
Depends: #43057
Releases: 6.1
Change-Id: Ib114f29f87cc4560368f416f4445f63da7c775c2
Reviewed-on: https://review.typo3.org/17105
Reviewed-by: Alexander Schnitzler
Tested-by: Alexander Schnitzler
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetControllerTest.php

index 28a703e..c3b15e4 100644 (file)
@@ -47,6 +47,11 @@ class AbstractWidgetControllerTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTes
                $mockUriBuilder = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
                $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
                $objectManager->expects($this->any())->method('create')->with('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder')->will($this->returnValue($mockUriBuilder));
+
+               $configurationService = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\MvcPropertyMappingConfigurationService');
+               $abstractWidgetController->injectMvcPropertyMappingConfigurationService($configurationService);
+               $abstractWidgetController->_set('arguments', new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments());
+
                $abstractWidgetController->_set('objectManager', $objectManager);
                $abstractWidgetController->processRequest($request, $response);
                $widgetConfiguration = $abstractWidgetController->_get('widgetConfiguration');