From 84f3d2ddebbda3d565a61f38d9d79e66072ab692 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sat, 7 Mar 2020 16:18:21 +0100 Subject: [POC] Event for failed login attempts Signed-off-by: Roeland Jago Douma --- tests/lib/Authentication/Login/LoggedInCheckCommandTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php index 3b18c97a612..f051147609c 100644 --- a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php +++ b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php @@ -25,8 +25,10 @@ declare(strict_types=1); namespace lib\Authentication\Login; +use Hoa\Iterator\Mock; use OC\Authentication\Login\LoggedInCheckCommand; use OC\Core\Controller\LoginController; +use OCP\EventDispatcher\IEventDispatcher; use OCP\ILogger; use PHPUnit\Framework\MockObject\MockObject; @@ -35,13 +37,18 @@ class LoggedInCheckCommandTest extends ALoginCommandTest { /** @var ILogger|MockObject */ private $logger; + /** @var IEventDispatcher|MockObject */ + private $dispatcher; + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); + $this->dispatcher = $this->createMock(IEventDispatcher::class); $this->cmd = new LoggedInCheckCommand( - $this->logger + $this->logger, + $this->dispatcher ); } -- cgit v1.2.3