aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/container
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-05-20 12:43:40 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commitdd09ec52b20b4a548ecf5c847627575e506e3a50 (patch)
treeb598b84727df2c604622b4db1dfee831dc7c5dca /tests/container
parent5ec4708ced1cdca01eddd7e52377ab5e5f8b3290 (diff)
downloadShaarli-dd09ec52b20b4a548ecf5c847627575e506e3a50.tar.gz
Shaarli-dd09ec52b20b4a548ecf5c847627575e506e3a50.tar.zst
Shaarli-dd09ec52b20b4a548ecf5c847627575e506e3a50.zip
Refactor front controller tests to create container mock using a trait
Diffstat (limited to 'tests/container')
-rw-r--r--tests/container/ShaarliTestContainer.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/container/ShaarliTestContainer.php b/tests/container/ShaarliTestContainer.php
new file mode 100644
index 00000000..53197ae6
--- /dev/null
+++ b/tests/container/ShaarliTestContainer.php
@@ -0,0 +1,38 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Shaarli\Container;
6
7use PHPUnit\Framework\MockObject\MockObject;
8use Shaarli\Bookmark\BookmarkServiceInterface;
9use Shaarli\Config\ConfigManager;
10use Shaarli\Feed\FeedBuilder;
11use Shaarli\Formatter\FormatterFactory;
12use Shaarli\History;
13use Shaarli\Plugin\PluginManager;
14use Shaarli\Render\PageBuilder;
15use Shaarli\Render\PageCacheManager;
16use Shaarli\Security\LoginManager;
17use Shaarli\Security\SessionManager;
18
19/**
20 * Test helper allowing auto-completion for MockObjects.
21 *
22 * @property mixed[] $environment $_SERVER automatically injected by Slim
23 * @property MockObject|ConfigManager $conf
24 * @property MockObject|SessionManager $sessionManager
25 * @property MockObject|LoginManager $loginManager
26 * @property MockObject|string $webPath
27 * @property MockObject|History $history
28 * @property MockObject|BookmarkServiceInterface $bookmarkService
29 * @property MockObject|PageBuilder $pageBuilder
30 * @property MockObject|PluginManager $pluginManager
31 * @property MockObject|FormatterFactory $formatterFactory
32 * @property MockObject|PageCacheManager $pageCacheManager
33 * @property MockObject|FeedBuilder $feedBuilder
34 */
35class ShaarliTestContainer extends ShaarliContainer
36{
37
38}