diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-05-20 12:43:40 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | dd09ec52b20b4a548ecf5c847627575e506e3a50 (patch) | |
tree | b598b84727df2c604622b4db1dfee831dc7c5dca /tests/container | |
parent | 5ec4708ced1cdca01eddd7e52377ab5e5f8b3290 (diff) | |
download | Shaarli-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.php | 38 |
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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Shaarli\Container; | ||
6 | |||
7 | use PHPUnit\Framework\MockObject\MockObject; | ||
8 | use Shaarli\Bookmark\BookmarkServiceInterface; | ||
9 | use Shaarli\Config\ConfigManager; | ||
10 | use Shaarli\Feed\FeedBuilder; | ||
11 | use Shaarli\Formatter\FormatterFactory; | ||
12 | use Shaarli\History; | ||
13 | use Shaarli\Plugin\PluginManager; | ||
14 | use Shaarli\Render\PageBuilder; | ||
15 | use Shaarli\Render\PageCacheManager; | ||
16 | use Shaarli\Security\LoginManager; | ||
17 | use 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 | */ | ||
35 | class ShaarliTestContainer extends ShaarliContainer | ||
36 | { | ||
37 | |||
38 | } | ||