aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/front/controller/LoginControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/front/controller/LoginControllerTest.php')
-rw-r--r--tests/front/controller/LoginControllerTest.php9
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);
5namespace Shaarli\Front\Controller; 5namespace Shaarli\Front\Controller;
6 6
7use PHPUnit\Framework\TestCase; 7use PHPUnit\Framework\TestCase;
8use Shaarli\Bookmark\BookmarkServiceInterface;
8use Shaarli\Config\ConfigManager; 9use Shaarli\Config\ConfigManager;
9use Shaarli\Container\ShaarliContainer; 10use Shaarli\Container\ShaarliContainer;
10use Shaarli\Front\Exception\LoginBannedException; 11use Shaarli\Front\Exception\LoginBannedException;
12use Shaarli\Plugin\PluginManager;
11use Shaarli\Render\PageBuilder; 13use Shaarli\Render\PageBuilder;
12use Shaarli\Security\LoginManager; 14use Shaarli\Security\LoginManager;
13use Slim\Http\Request; 15use 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}