mirror of
https://github.com/friendica/friendica
synced 2024-11-09 17:02:54 +00:00
Tests again
This commit is contained in:
parent
a312940a21
commit
86c14f4d43
1 changed files with 12 additions and 0 deletions
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue