mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02: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\GnuSocial\Help;
|
||||
|
||||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\GNUSocial\Help\Test;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
|
@ -13,6 +14,7 @@ class TestTest extends ApiTest
|
|||
$test = new Test(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']);
|
||||
$response = $test->run();
|
||||
|
||||
self::assertEquals(['Content-type' => ['application/json'], ICanCreateResponses::X_HEADER => ['json']], $response->getHeaders());
|
||||
self::assertEquals('"ok"', $response->getBody());
|
||||
}
|
||||
|
||||
|
@ -21,6 +23,7 @@ class TestTest extends ApiTest
|
|||
$test = new Test(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml']);
|
||||
$response = $test->run();
|
||||
|
||||
self::assertEquals(['Content-type' => ['text/xml'], ICanCreateResponses::X_HEADER => ['xml']], $response->getHeaders());
|
||||
self::assertxml($response->getBody(), 'ok');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue