[BUGFIX] Fix insufficient mocking in ContentObjectRenderer 06/31206/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Sat, 28 Jun 2014 19:31:38 +0000 (21:31 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Sat, 28 Jun 2014 19:33:40 +0000 (21:33 +0200)
Resolves: #59967
Releases: 6.3, 6.2
Change-Id: Ie30b8e522f9045c7cd6cbe9c032413c0ad936b1a
Reviewed-on: https://review.typo3.org/31206
Reviewed-by: Markus Klein
Tested-by: Markus Klein
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));