diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-06-13 13:08:01 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 9c75f877935fa6adec951a4d8d32b328aaab314f (patch) | |
tree | 1cdd09ddfc00c6cebb92bb2b90381a06fd31246d /tests/container/ContainerBuilderTest.php | |
parent | 818b3193ffabec57501e3bdfa997206e3c0671ef (diff) | |
download | Shaarli-9c75f877935fa6adec951a4d8d32b328aaab314f.tar.gz Shaarli-9c75f877935fa6adec951a4d8d32b328aaab314f.tar.zst Shaarli-9c75f877935fa6adec951a4d8d32b328aaab314f.zip |
Use multi-level routes for existing controllers instead of 1 level everywhere
Also prefix most admin routes with /admin/
Diffstat (limited to 'tests/container/ContainerBuilderTest.php')
-rw-r--r-- | tests/container/ContainerBuilderTest.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/container/ContainerBuilderTest.php b/tests/container/ContainerBuilderTest.php index 65647249..db533f37 100644 --- a/tests/container/ContainerBuilderTest.php +++ b/tests/container/ContainerBuilderTest.php | |||
@@ -7,12 +7,16 @@ namespace Shaarli\Container; | |||
7 | use PHPUnit\Framework\TestCase; | 7 | use PHPUnit\Framework\TestCase; |
8 | use Shaarli\Bookmark\BookmarkServiceInterface; | 8 | use Shaarli\Bookmark\BookmarkServiceInterface; |
9 | use Shaarli\Config\ConfigManager; | 9 | use Shaarli\Config\ConfigManager; |
10 | use Shaarli\Feed\FeedBuilder; | ||
10 | use Shaarli\Formatter\FormatterFactory; | 11 | use Shaarli\Formatter\FormatterFactory; |
11 | use Shaarli\History; | 12 | use Shaarli\History; |
13 | use Shaarli\Http\HttpAccess; | ||
14 | use Shaarli\Plugin\PluginManager; | ||
12 | use Shaarli\Render\PageBuilder; | 15 | use Shaarli\Render\PageBuilder; |
13 | use Shaarli\Render\PageCacheManager; | 16 | use Shaarli\Render\PageCacheManager; |
14 | use Shaarli\Security\LoginManager; | 17 | use Shaarli\Security\LoginManager; |
15 | use Shaarli\Security\SessionManager; | 18 | use Shaarli\Security\SessionManager; |
19 | use Shaarli\Thumbnailer; | ||
16 | 20 | ||
17 | class ContainerBuilderTest extends TestCase | 21 | class ContainerBuilderTest extends TestCase |
18 | { | 22 | { |
@@ -39,8 +43,7 @@ class ContainerBuilderTest extends TestCase | |||
39 | $this->containerBuilder = new ContainerBuilder( | 43 | $this->containerBuilder = new ContainerBuilder( |
40 | $this->conf, | 44 | $this->conf, |
41 | $this->sessionManager, | 45 | $this->sessionManager, |
42 | $this->loginManager, | 46 | $this->loginManager |
43 | 'UT web path' | ||
44 | ); | 47 | ); |
45 | } | 48 | } |
46 | 49 | ||
@@ -51,11 +54,17 @@ class ContainerBuilderTest extends TestCase | |||
51 | static::assertInstanceOf(ConfigManager::class, $container->conf); | 54 | static::assertInstanceOf(ConfigManager::class, $container->conf); |
52 | static::assertInstanceOf(SessionManager::class, $container->sessionManager); | 55 | static::assertInstanceOf(SessionManager::class, $container->sessionManager); |
53 | static::assertInstanceOf(LoginManager::class, $container->loginManager); | 56 | static::assertInstanceOf(LoginManager::class, $container->loginManager); |
54 | static::assertSame('UT web path', $container->webPath); | ||
55 | static::assertInstanceOf(History::class, $container->history); | 57 | static::assertInstanceOf(History::class, $container->history); |
56 | static::assertInstanceOf(BookmarkServiceInterface::class, $container->bookmarkService); | 58 | static::assertInstanceOf(BookmarkServiceInterface::class, $container->bookmarkService); |
57 | static::assertInstanceOf(PageBuilder::class, $container->pageBuilder); | 59 | static::assertInstanceOf(PageBuilder::class, $container->pageBuilder); |
60 | static::assertInstanceOf(PluginManager::class, $container->pluginManager); | ||
58 | static::assertInstanceOf(FormatterFactory::class, $container->formatterFactory); | 61 | static::assertInstanceOf(FormatterFactory::class, $container->formatterFactory); |
59 | static::assertInstanceOf(PageCacheManager::class, $container->pageCacheManager); | 62 | static::assertInstanceOf(PageCacheManager::class, $container->pageCacheManager); |
63 | static::assertInstanceOf(FeedBuilder::class, $container->feedBuilder); | ||
64 | static::assertInstanceOf(Thumbnailer::class, $container->thumbnailer); | ||
65 | static::assertInstanceOf(HttpAccess::class, $container->httpAccess); | ||
66 | |||
67 | // Set by the middleware | ||
68 | static::assertNull($container->basePath); | ||
60 | } | 69 | } |
61 | } | 70 | } |