2 declare(strict_types = 1);
18 use Prophecy\Argument;
19 use Prophecy\Prophecy\ObjectProphecy;
20 use Psr\Http\Message\ResponseInterface;
21 use Psr\Http\Message\ServerRequestInterface;
22 use Psr\Http\Server\RequestHandlerInterface;
28 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
57 $userAuthentication = $this->prophesize(FrontendBackendUserAuthentication::class);
58 $userAuthentication->getTSConfig()->willReturn($tsConfig);
59 $userAuthentication->uc = $uc;
60 $GLOBALS[
'BE_USER'] = $userAuthentication->reveal();
62 $tsfe = $this->prophesize(TypoScriptFrontendController::class);
65 $controller = $this->prophesize(MainController::class);
66 GeneralUtility::setSingletonInstance(MainController::class, $controller->reveal());
68 $request = $this->prophesize(ServerRequestInterface::class);
69 $request->withAttribute(Argument::cetera())->willReturn($request);
72 $adminPanelInitiator->process(
77 $controller->initialize(Argument::any())->shouldHaveBeenCalled();
94 'display_top' => false
110 'display_top' => true
123 $userAuthentication = $this->prophesize(FrontendBackendUserAuthentication::class);
124 $userAuthentication->getTSConfig()->willReturn($tsConfig);
125 $userAuthentication->uc = $uc;
126 $GLOBALS[
'BE_USER'] = $userAuthentication->reveal();
128 $tsfe = $this->prophesize(TypoScriptFrontendController::class);
131 $controller = $this->prophesize(MainController::class);
132 GeneralUtility::setSingletonInstance(MainController::class, $controller->reveal());
134 $request = $this->prophesize(ServerRequestInterface::class);
137 $adminPanelInitiator->process(
142 $controller->initialize(Argument::any())->shouldNotHaveBeenCalled();
150 $handler = $this->prophesize(RequestHandlerInterface::class);
152 ->handle(Argument::any())
154 $this->prophesize(ResponseInterface::class)->reveal()