pull/10987/head
Michael 2021-11-17 23:11:21 +00:00
rodzic a312940a21
commit 86c14f4d43
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -710,6 +710,7 @@ class ApiTest extends FixtureTest
$_SERVER['PHP_AUTH_USER'] = 'Test user';
$_SERVER['PHP_AUTH_PW'] = 'password';
$_SESSION['allow_api'] = false;
BasicAuth::setCurrentUserID();
self::assertFalse(api_get_user());
}
@ -1423,6 +1424,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_search('json');
}
@ -1479,6 +1481,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_statuses_home_timeline('json');
}
@ -1550,6 +1553,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_statuses_public_timeline('json');
}
@ -1604,6 +1608,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_statuses_networkpublic_timeline('json');
}
@ -1667,6 +1672,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_statuses_show('json');
}
@ -1708,6 +1714,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_conversation_show('json');
}
@ -1822,6 +1829,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_statuses_mentions('json');
}
@ -1889,6 +1897,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_statuses_user_timeline('json');
}
@ -2017,6 +2026,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_favorites('json');
}
@ -2442,6 +2452,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_lists_statuses('json');
}
@ -2868,6 +2879,7 @@ class ApiTest extends FixtureTest
$this->expectException(\Friendica\Network\HTTPException\ForbiddenException::class);
$_SESSION['allow_api'] = false;
$_GET['screen_name'] = $this->selfUser['nick'];
BasicAuth::setCurrentUserID();
api_direct_messages_box('json', 'sentbox', 'false');
}