aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/container/ContainerBuilderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/container/ContainerBuilderTest.php')
-rw-r--r--tests/container/ContainerBuilderTest.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/container/ContainerBuilderTest.php b/tests/container/ContainerBuilderTest.php
index 5d52daef..04d4ef01 100644
--- a/tests/container/ContainerBuilderTest.php
+++ b/tests/container/ContainerBuilderTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
4 4
5namespace Shaarli\Container; 5namespace Shaarli\Container;
6 6
7use Psr\Log\LoggerInterface;
7use Shaarli\Bookmark\BookmarkServiceInterface; 8use Shaarli\Bookmark\BookmarkServiceInterface;
8use Shaarli\Config\ConfigManager; 9use Shaarli\Config\ConfigManager;
9use Shaarli\Feed\FeedBuilder; 10use Shaarli\Feed\FeedBuilder;
@@ -12,6 +13,7 @@ use Shaarli\Front\Controller\Visitor\ErrorController;
12use Shaarli\Front\Controller\Visitor\ErrorNotFoundController; 13use Shaarli\Front\Controller\Visitor\ErrorNotFoundController;
13use Shaarli\History; 14use Shaarli\History;
14use Shaarli\Http\HttpAccess; 15use Shaarli\Http\HttpAccess;
16use Shaarli\Http\MetadataRetriever;
15use Shaarli\Netscape\NetscapeBookmarkUtils; 17use Shaarli\Netscape\NetscapeBookmarkUtils;
16use Shaarli\Plugin\PluginManager; 18use Shaarli\Plugin\PluginManager;
17use Shaarli\Render\PageBuilder; 19use Shaarli\Render\PageBuilder;
@@ -41,11 +43,15 @@ class ContainerBuilderTest extends TestCase
41 /** @var CookieManager */ 43 /** @var CookieManager */
42 protected $cookieManager; 44 protected $cookieManager;
43 45
46 /** @var PluginManager */
47 protected $pluginManager;
48
44 public function setUp(): void 49 public function setUp(): void
45 { 50 {
46 $this->conf = new ConfigManager('tests/utils/config/configJson'); 51 $this->conf = new ConfigManager('tests/utils/config/configJson');
47 $this->sessionManager = $this->createMock(SessionManager::class); 52 $this->sessionManager = $this->createMock(SessionManager::class);
48 $this->cookieManager = $this->createMock(CookieManager::class); 53 $this->cookieManager = $this->createMock(CookieManager::class);
54 $this->pluginManager = $this->createMock(PluginManager::class);
49 55
50 $this->loginManager = $this->createMock(LoginManager::class); 56 $this->loginManager = $this->createMock(LoginManager::class);
51 $this->loginManager->method('isLoggedIn')->willReturn(true); 57 $this->loginManager->method('isLoggedIn')->willReturn(true);
@@ -54,7 +60,9 @@ class ContainerBuilderTest extends TestCase
54 $this->conf, 60 $this->conf,
55 $this->sessionManager, 61 $this->sessionManager,
56 $this->cookieManager, 62 $this->cookieManager,
57 $this->loginManager 63 $this->loginManager,
64 $this->pluginManager,
65 $this->createMock(LoggerInterface::class)
58 ); 66 );
59 } 67 }
60 68
@@ -72,6 +80,8 @@ class ContainerBuilderTest extends TestCase
72 static::assertInstanceOf(History::class, $container->history); 80 static::assertInstanceOf(History::class, $container->history);
73 static::assertInstanceOf(HttpAccess::class, $container->httpAccess); 81 static::assertInstanceOf(HttpAccess::class, $container->httpAccess);
74 static::assertInstanceOf(LoginManager::class, $container->loginManager); 82 static::assertInstanceOf(LoginManager::class, $container->loginManager);
83 static::assertInstanceOf(LoggerInterface::class, $container->logger);
84 static::assertInstanceOf(MetadataRetriever::class, $container->metadataRetriever);
75 static::assertInstanceOf(NetscapeBookmarkUtils::class, $container->netscapeBookmarkUtils); 85 static::assertInstanceOf(NetscapeBookmarkUtils::class, $container->netscapeBookmarkUtils);
76 static::assertInstanceOf(PageBuilder::class, $container->pageBuilder); 86 static::assertInstanceOf(PageBuilder::class, $container->pageBuilder);
77 static::assertInstanceOf(PageCacheManager::class, $container->pageCacheManager); 87 static::assertInstanceOf(PageCacheManager::class, $container->pageCacheManager);