aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/front/controller/admin/ShaarliAdminControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/front/controller/admin/ShaarliAdminControllerTest.php')
-rw-r--r--tests/front/controller/admin/ShaarliAdminControllerTest.php15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/front/controller/admin/ShaarliAdminControllerTest.php b/tests/front/controller/admin/ShaarliAdminControllerTest.php
index 7c5f50a6..fff427cb 100644
--- a/tests/front/controller/admin/ShaarliAdminControllerTest.php
+++ b/tests/front/controller/admin/ShaarliAdminControllerTest.php
@@ -5,9 +5,7 @@ declare(strict_types=1);
5namespace Shaarli\Front\Controller\Admin; 5namespace Shaarli\Front\Controller\Admin;
6 6
7use PHPUnit\Framework\TestCase; 7use PHPUnit\Framework\TestCase;
8use Shaarli\Front\Exception\UnauthorizedException;
9use Shaarli\Front\Exception\WrongTokenException; 8use Shaarli\Front\Exception\WrongTokenException;
10use Shaarli\Security\LoginManager;
11use Shaarli\Security\SessionManager; 9use Shaarli\Security\SessionManager;
12use Slim\Http\Request; 10use Slim\Http\Request;
13 11
@@ -53,19 +51,6 @@ class ShaarliAdminControllerTest extends TestCase
53 } 51 }
54 52
55 /** 53 /**
56 * Creating an instance of an admin controller while logged out should raise an exception.
57 */
58 public function testInstantiateWhileLoggedOut(): void
59 {
60 $this->expectException(UnauthorizedException::class);
61
62 $this->container->loginManager = $this->createMock(LoginManager::class);
63 $this->container->loginManager->method('isLoggedIn')->willReturn(false);
64
65 $this->controller = new class($this->container) extends ShaarliAdminController {};
66 }
67
68 /**
69 * Trigger controller's checkToken with a valid token. 54 * Trigger controller's checkToken with a valid token.
70 */ 55 */
71 public function testCheckTokenWithValidToken(): void 56 public function testCheckTokenWithValidToken(): void