->method('isEnvironmentInFrontendMode')
->willReturn(true);
GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Service\EnvironmentService::class, $environmentServiceMock);
->method('isEnvironmentInFrontendMode')
->willReturn(true);
GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Service\EnvironmentService::class, $environmentServiceMock);