2 declare(strict_types = 1);
18 use Prophecy\Argument;
19 use Prophecy\Prophecy\ObjectProphecy;
26 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
56 $this->subject->getReport();
58 $standaloneViewProphecy
59 ->assignMultiple(Argument::withEntry(
'servicesList', []))
60 ->shouldHaveBeenCalled();
61 $standaloneViewProphecy
62 ->assignMultiple(Argument::withKey(
'searchPaths'))
63 ->shouldHaveBeenCalled();
72 $templatePath = GeneralUtility::getFileAbsFileName(
73 'EXT:reports/Resources/Private/Templates/ServicesListReport.html'
75 $serverRequestProphecy = $this->prophesize(Request::class);
77 $standaloneViewProphecy = $this->prophesize(StandaloneView::class);
78 $standaloneViewProphecy->getRequest()->willReturn($serverRequestProphecy->reveal());
79 $standaloneViewProphecy->setTemplatePathAndFilename($templatePath)->shouldBeCalled();
80 $standaloneViewProphecy->assignMultiple(Argument::any())->willReturn($standaloneViewProphecy->reveal());
81 $standaloneViewProphecy->render()->willReturn(
'<p>Template output</p>');
82 GeneralUtility::addInstance(StandaloneView::class, $standaloneViewProphecy->reveal());
84 return $standaloneViewProphecy;
92 $languageServiceProphecy = $this->prophesize(LanguageService::class);
93 $languageServiceProphecy
94 ->includeLLFile(
'EXT:reports/Resources/Private/Language/locallang_servicereport.xlf')
97 $languageServiceProphecy->getLL(Argument::any())->willReturn(
'translation string');
98 return $languageServiceProphecy;
106 $reportControllerProphecy = $this->prophesize(ReportController::class);
107 return $reportControllerProphecy;