-
- protected function createValidContainerMockSet(): void
- {
- // User logged out
- $loginManager = $this->createMock(LoginManager::class);
- $loginManager->method('isLoggedIn')->willReturn(false);
- $loginManager->method('canLogin')->willReturn(true);
- $this->container->loginManager = $loginManager;
-
- // Config
- $conf = $this->createMock(ConfigManager::class);
- $conf->method('get')->willReturnCallback(function (string $parameter, $default) {
- return $default;
- });
- $this->container->conf = $conf;
-
- // PageBuilder
- $pageBuilder = $this->createMock(PageBuilder::class);
- $pageBuilder
- ->method('render')
- ->willReturnCallback(function (string $template): string {
- return $template;
- })
- ;
- $this->container->pageBuilder = $pageBuilder;
-
- $pluginManager = $this->createMock(PluginManager::class);
- $this->container->pluginManager = $pluginManager;
- $bookmarkService = $this->createMock(BookmarkServiceInterface::class);
- $this->container->bookmarkService = $bookmarkService;
- }