[BUGFIX] Fix insufficient mocking in ContentObjectRenderer
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Tests / Unit / ContentObject / ContentObjectRendererTest.php
index 29c5e56..96c190a 100644 (file)
@@ -2511,7 +2511,13 @@ class ContentObjectRendererTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getImageSourceCollectionHookCalled() {
-               // Avoid calling stdwrap and getIMgResouce
+               $this->cObj = $this->getAccessibleMock(
+                       'TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer',
+                       array('getResourceFactory', 'stdWrap', 'getImgResource')
+               );
+               $this->cObj->start(array(), 'tt_content');
+
+               // Avoid calling stdwrap and getImgResource
                $this->cObj->expects($this->any())
                        ->method('stdWrap')
                        ->will($this->returnArgument(0));