[+BUGFIX] Fluid (Tests): Fixed CropViewHelper unit test
authorBastian Waidelich <bastian@typo3.org>
Tue, 25 Jan 2011 13:37:34 +0000 (13:37 +0000)
committerBastian Waidelich <bastian@typo3.org>
Tue, 25 Jan 2011 13:37:34 +0000 (13:37 +0000)
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CropViewHelperTest.php

index 8e3f989..e211ccb 100644 (file)
@@ -34,11 +34,19 @@ class Tx_Fluid_Tests_Unit_ViewHelpers_Format_CropViewHelperTest extends Tx_Extba
         */
        protected $mockContentObject;
 
+       /**
+        * @var Tx_Extbase_Configuration_ConfigurationManagerInterface
+        */
+       protected $mockConfigurationManager;
+
        public function setUp() {
                parent::setUp();
 
                $this->mockContentObject = $this->getMock('tslib_cObj', array(), array(), '', FALSE);
-               $this->viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CropViewHelper', array('renderChildren'), array($this->mockContentObject));
+               $this->mockConfigurationManager = $this->getMock('Tx_Extbase_Configuration_ConfigurationManagerInterface');
+               $this->mockConfigurationManager->expects($this->any())->method('getContentObject')->will($this->returnValue($this->mockContentObject));
+               $this->viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CropViewHelper', array('renderChildren'));
+               $this->viewHelper->injectConfigurationManager($this->mockConfigurationManager);
                $this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Some Content'));
        }