mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 03:34:27 +02:00
Add newly required constructor parameter to BaseApi-related tests
This commit is contained in:
parent
1b9ec3a214
commit
5d428ac8af
37 changed files with 85 additions and 85 deletions
|
@ -30,7 +30,7 @@ class TestTest extends ApiTest
|
|||
{
|
||||
public function testJson()
|
||||
{
|
||||
$response = (new Test(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
|
||||
$response = (new Test(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
|
||||
->run($this->httpExceptionMock);
|
||||
|
||||
$json = $this->toJson($response);
|
||||
|
@ -44,13 +44,13 @@ class TestTest extends ApiTest
|
|||
|
||||
public function testXml()
|
||||
{
|
||||
$response = (new Test(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml']))
|
||||
$response = (new Test(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml']))
|
||||
->run($this->httpExceptionMock);
|
||||
|
||||
self::assertEquals([
|
||||
'Content-type' => ['text/xml'],
|
||||
ICanCreateResponses::X_HEADER => ['xml']
|
||||
], $response->getHeaders());
|
||||
self::assertxml($response->getBody(), 'ok');
|
||||
self::assertXml($response->getBody(), 'ok');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue