[BUGFIX] Fix getSiteFinder() mocking in SiteProcessorTest 74/61074/2
authorBenjamin Franzke <bfr@qbus.de>
Mon, 17 Jun 2019 14:32:31 +0000 (16:32 +0200)
committerBenjamin Franzke <bfr@qbus.de>
Tue, 18 Jun 2019 06:47:47 +0000 (08:47 +0200)
As it produced a warning:
1) TYPO3\CMS\Frontend\Tests\Unit\DataProcessing\SiteProcessorTest::
  nullIsProvidedIfSiteCouldNotBeRetrieved
Trying to configure method "getSiteFinder" which cannot be configured
because it does not exist, has not been specified, is final, or is static

Resolves: #88576
Related: #88568
Releases: master
Change-Id: Icf72100282ce24c87b6bb9f49fc978b6187a817e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61074
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
typo3/sysext/frontend/Tests/Unit/DataProcessing/SiteProcessorTest.php

index e2cffe2..ef43056 100644 (file)
@@ -60,7 +60,7 @@ class SiteProcessorTest extends UnitTestCase
         $finderMock = $this->getMockBuilder(SiteFinder::class)->disableOriginalConstructor()->getMock();
         $finderMock->expects($this->any())->method('getSiteByPageId')->willThrowException(new SiteNotFoundException('message', 1550670118));
 
-        $subject = $this->getAccessibleMock(SiteProcessor::class, ['getMatcher', 'getCurrentPageId'], []);
+        $subject = $this->getAccessibleMock(SiteProcessor::class, ['getSiteFinder', 'getCurrentPageId'], []);
         $subject->expects($this->any())->method('getSiteFinder')->willReturn($finderMock);
         $subject->expects($this->any())->method('getCurrentPageId')->willReturn(1);