From 2723e28a180f8a006451bf1da30c297e1ba4b5dd Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 18 Nov 2021 06:03:21 +0000 Subject: [PATCH] Tests ... --- tests/legacy/ApiTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/legacy/ApiTest.php b/tests/legacy/ApiTest.php index 550bc54c2..e30c41c78 100644 --- a/tests/legacy/ApiTest.php +++ b/tests/legacy/ApiTest.php @@ -311,6 +311,7 @@ class ApiTest extends FixtureTest */ public function testApiLoginWithoutLogin() { + BasicAuth::setCurrentUserID(); $this->expectException(\Friendica\Network\HTTPException\UnauthorizedException::class); BasicAuth::getCurrentUserID(true); } @@ -324,6 +325,7 @@ class ApiTest extends FixtureTest */ public function testApiLoginWithBadLogin() { + BasicAuth::setCurrentUserID(); $this->expectException(\Friendica\Network\HTTPException\UnauthorizedException::class); $_SERVER['PHP_AUTH_USER'] = 'user@server'; BasicAuth::getCurrentUserID(true); @@ -358,6 +360,7 @@ class ApiTest extends FixtureTest */ public function testApiLoginWithCorrectLogin() { + BasicAuth::setCurrentUserID(); $_SERVER['PHP_AUTH_USER'] = 'Test user'; $_SERVER['PHP_AUTH_PW'] = 'password'; BasicAuth::getCurrentUserID(true); @@ -371,6 +374,7 @@ class ApiTest extends FixtureTest */ public function testApiLoginWithRemoteUser() { + BasicAuth::setCurrentUserID(); $this->expectException(\Friendica\Network\HTTPException\UnauthorizedException::class); $_SERVER['REDIRECT_REMOTE_USER'] = '123456dXNlcjpwYXNzd29yZA=='; BasicAuth::getCurrentUserID(true);