Adapt API tests for dynamic usage

This commit is contained in:
Philipp 2021-11-14 23:35:01 +01:00
parent cca1be21a3
commit d32f8e5285
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
8 changed files with 23 additions and 15 deletions

View file

@ -10,7 +10,8 @@ class RateLimitStatusTest extends ApiTest
{
public function testWithJson()
{
RateLimitStatus::rawContent(['extension' => 'json']);
$rateLimitStatus = new RateLimitStatus(['extension' => 'json']);
$rateLimitStatus->rawContent();
$result = json_decode(ApiResponseDouble::getOutput());
@ -21,7 +22,8 @@ class RateLimitStatusTest extends ApiTest
public function testWithXml()
{
RateLimitStatus::rawContent(['extension' => 'xml']);
$rateLimitStatus = new RateLimitStatus(['extension' => 'xml']);
$rateLimitStatus->rawContent();
self::assertXml(ApiResponseDouble::getOutput(), 'hash');
}

View file

@ -10,7 +10,8 @@ class SavedSearchesTest extends ApiTest
{
public function test()
{
SavedSearches::rawContent(['extension' => 'json']);
$savedSearch = new SavedSearches(['extension' => 'json']);
$savedSearch->rawContent();
$result = json_decode(ApiResponseDouble::getOutput());