diff options
Diffstat (limited to 'tests/front/controller/LoginControllerTest.php')
-rw-r--r-- | tests/front/controller/LoginControllerTest.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/front/controller/LoginControllerTest.php b/tests/front/controller/LoginControllerTest.php index ddcfe154..8cf8ece7 100644 --- a/tests/front/controller/LoginControllerTest.php +++ b/tests/front/controller/LoginControllerTest.php | |||
@@ -5,9 +5,11 @@ declare(strict_types=1); | |||
5 | namespace Shaarli\Front\Controller; | 5 | namespace Shaarli\Front\Controller; |
6 | 6 | ||
7 | use PHPUnit\Framework\TestCase; | 7 | use PHPUnit\Framework\TestCase; |
8 | use Shaarli\Bookmark\BookmarkServiceInterface; | ||
8 | use Shaarli\Config\ConfigManager; | 9 | use Shaarli\Config\ConfigManager; |
9 | use Shaarli\Container\ShaarliContainer; | 10 | use Shaarli\Container\ShaarliContainer; |
10 | use Shaarli\Front\Exception\LoginBannedException; | 11 | use Shaarli\Front\Exception\LoginBannedException; |
12 | use Shaarli\Plugin\PluginManager; | ||
11 | use Shaarli\Render\PageBuilder; | 13 | use Shaarli\Render\PageBuilder; |
12 | use Shaarli\Security\LoginManager; | 14 | use Shaarli\Security\LoginManager; |
13 | use Slim\Http\Request; | 15 | use Slim\Http\Request; |
@@ -37,7 +39,6 @@ class LoginControllerTest extends TestCase | |||
37 | 39 | ||
38 | $assignedVariables = []; | 40 | $assignedVariables = []; |
39 | $this->container->pageBuilder | 41 | $this->container->pageBuilder |
40 | ->expects(static::exactly(3)) | ||
41 | ->method('assign') | 42 | ->method('assign') |
42 | ->willReturnCallback(function ($key, $value) use (&$assignedVariables) { | 43 | ->willReturnCallback(function ($key, $value) use (&$assignedVariables) { |
43 | $assignedVariables[$key] = $value; | 44 | $assignedVariables[$key] = $value; |
@@ -68,7 +69,6 @@ class LoginControllerTest extends TestCase | |||
68 | 69 | ||
69 | $assignedVariables = []; | 70 | $assignedVariables = []; |
70 | $this->container->pageBuilder | 71 | $this->container->pageBuilder |
71 | ->expects(static::exactly(4)) | ||
72 | ->method('assign') | 72 | ->method('assign') |
73 | ->willReturnCallback(function ($key, $value) use (&$assignedVariables) { | 73 | ->willReturnCallback(function ($key, $value) use (&$assignedVariables) { |
74 | $assignedVariables[$key] = $value; | 74 | $assignedVariables[$key] = $value; |
@@ -169,5 +169,10 @@ class LoginControllerTest extends TestCase | |||
169 | }) | 169 | }) |
170 | ; | 170 | ; |
171 | $this->container->pageBuilder = $pageBuilder; | 171 | $this->container->pageBuilder = $pageBuilder; |
172 | |||
173 | $pluginManager = $this->createMock(PluginManager::class); | ||
174 | $this->container->pluginManager = $pluginManager; | ||
175 | $bookmarkService = $this->createMock(BookmarkServiceInterface::class); | ||
176 | $this->container->bookmarkService = $bookmarkService; | ||
172 | } | 177 | } |
173 | } | 178 | } |