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);