mirror of
https://github.com/friendica/friendica
synced 2025-04-24 09:10:17 +00:00
Fixing Response
This commit is contained in:
parent
ae24bf8d54
commit
6a9fff5100
11 changed files with 41 additions and 12 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Twitter\Account;
|
||||
|
||||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Account\RateLimitStatus;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
|
@ -15,6 +16,7 @@ class RateLimitStatusTest extends ApiTest
|
|||
|
||||
$result = json_decode($response->getBody());
|
||||
|
||||
self::assertEquals(['Content-type' => ['application/json'], ICanCreateResponses::X_HEADER => ['json']], $response->getHeaders());
|
||||
self::assertEquals(150, $result->remaining_hits);
|
||||
self::assertEquals(150, $result->hourly_limit);
|
||||
self::assertIsInt($result->reset_time_in_seconds);
|
||||
|
@ -25,6 +27,7 @@ class RateLimitStatusTest extends ApiTest
|
|||
$rateLimitStatus = new RateLimitStatus(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml']);
|
||||
$response = $rateLimitStatus->run();
|
||||
|
||||
self::assertEquals(['Content-type' => ['text/xml'], ICanCreateResponses::X_HEADER => ['xml']], $response->getHeaders());
|
||||
self::assertXml($response->getBody(), 'hash');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue