diff options
Diffstat (limited to 'tests/container')
-rw-r--r-- | tests/container/ContainerBuilderTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/container/ContainerBuilderTest.php b/tests/container/ContainerBuilderTest.php index db533f37..fa77bf31 100644 --- a/tests/container/ContainerBuilderTest.php +++ b/tests/container/ContainerBuilderTest.php | |||
@@ -11,12 +11,15 @@ use Shaarli\Feed\FeedBuilder; | |||
11 | use Shaarli\Formatter\FormatterFactory; | 11 | use Shaarli\Formatter\FormatterFactory; |
12 | use Shaarli\History; | 12 | use Shaarli\History; |
13 | use Shaarli\Http\HttpAccess; | 13 | use Shaarli\Http\HttpAccess; |
14 | use Shaarli\Netscape\NetscapeBookmarkUtils; | ||
14 | use Shaarli\Plugin\PluginManager; | 15 | use Shaarli\Plugin\PluginManager; |
15 | use Shaarli\Render\PageBuilder; | 16 | use Shaarli\Render\PageBuilder; |
16 | use Shaarli\Render\PageCacheManager; | 17 | use Shaarli\Render\PageCacheManager; |
18 | use Shaarli\Security\CookieManager; | ||
17 | use Shaarli\Security\LoginManager; | 19 | use Shaarli\Security\LoginManager; |
18 | use Shaarli\Security\SessionManager; | 20 | use Shaarli\Security\SessionManager; |
19 | use Shaarli\Thumbnailer; | 21 | use Shaarli\Thumbnailer; |
22 | use Shaarli\Updater\Updater; | ||
20 | 23 | ||
21 | class ContainerBuilderTest extends TestCase | 24 | class ContainerBuilderTest extends TestCase |
22 | { | 25 | { |
@@ -32,10 +35,14 @@ class ContainerBuilderTest extends TestCase | |||
32 | /** @var ContainerBuilder */ | 35 | /** @var ContainerBuilder */ |
33 | protected $containerBuilder; | 36 | protected $containerBuilder; |
34 | 37 | ||
38 | /** @var CookieManager */ | ||
39 | protected $cookieManager; | ||
40 | |||
35 | public function setUp(): void | 41 | public function setUp(): void |
36 | { | 42 | { |
37 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 43 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
38 | $this->sessionManager = $this->createMock(SessionManager::class); | 44 | $this->sessionManager = $this->createMock(SessionManager::class); |
45 | $this->cookieManager = $this->createMock(CookieManager::class); | ||
39 | 46 | ||
40 | $this->loginManager = $this->createMock(LoginManager::class); | 47 | $this->loginManager = $this->createMock(LoginManager::class); |
41 | $this->loginManager->method('isLoggedIn')->willReturn(true); | 48 | $this->loginManager->method('isLoggedIn')->willReturn(true); |
@@ -43,6 +50,7 @@ class ContainerBuilderTest extends TestCase | |||
43 | $this->containerBuilder = new ContainerBuilder( | 50 | $this->containerBuilder = new ContainerBuilder( |
44 | $this->conf, | 51 | $this->conf, |
45 | $this->sessionManager, | 52 | $this->sessionManager, |
53 | $this->cookieManager, | ||
46 | $this->loginManager | 54 | $this->loginManager |
47 | ); | 55 | ); |
48 | } | 56 | } |
@@ -53,6 +61,7 @@ class ContainerBuilderTest extends TestCase | |||
53 | 61 | ||
54 | static::assertInstanceOf(ConfigManager::class, $container->conf); | 62 | static::assertInstanceOf(ConfigManager::class, $container->conf); |
55 | static::assertInstanceOf(SessionManager::class, $container->sessionManager); | 63 | static::assertInstanceOf(SessionManager::class, $container->sessionManager); |
64 | static::assertInstanceOf(CookieManager::class, $container->cookieManager); | ||
56 | static::assertInstanceOf(LoginManager::class, $container->loginManager); | 65 | static::assertInstanceOf(LoginManager::class, $container->loginManager); |
57 | static::assertInstanceOf(History::class, $container->history); | 66 | static::assertInstanceOf(History::class, $container->history); |
58 | static::assertInstanceOf(BookmarkServiceInterface::class, $container->bookmarkService); | 67 | static::assertInstanceOf(BookmarkServiceInterface::class, $container->bookmarkService); |
@@ -63,6 +72,8 @@ class ContainerBuilderTest extends TestCase | |||
63 | static::assertInstanceOf(FeedBuilder::class, $container->feedBuilder); | 72 | static::assertInstanceOf(FeedBuilder::class, $container->feedBuilder); |
64 | static::assertInstanceOf(Thumbnailer::class, $container->thumbnailer); | 73 | static::assertInstanceOf(Thumbnailer::class, $container->thumbnailer); |
65 | static::assertInstanceOf(HttpAccess::class, $container->httpAccess); | 74 | static::assertInstanceOf(HttpAccess::class, $container->httpAccess); |
75 | static::assertInstanceOf(NetscapeBookmarkUtils::class, $container->netscapeBookmarkUtils); | ||
76 | static::assertInstanceOf(Updater::class, $container->updater); | ||
66 | 77 | ||
67 | // Set by the middleware | 78 | // Set by the middleware |
68 | static::assertNull($container->basePath); | 79 | static::assertNull($container->basePath); |