2021-11-12 22:03:41 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Test\src\Module\Api\GnuSocial\Help;
|
|
|
|
|
2021-11-19 20:18:48 +01:00
|
|
|
use Friendica\DI;
|
2021-11-12 22:03:41 +01:00
|
|
|
use Friendica\Module\Api\GNUSocial\Help\Test;
|
|
|
|
use Friendica\Test\src\Module\Api\ApiTest;
|
|
|
|
|
|
|
|
class TestTest extends ApiTest
|
|
|
|
{
|
|
|
|
public function testJson()
|
|
|
|
{
|
2021-11-21 21:52:36 +01:00
|
|
|
$test = new Test(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']);
|
|
|
|
$response = $test->run();
|
2021-11-12 22:03:41 +01:00
|
|
|
|
2021-11-21 23:37:17 +01:00
|
|
|
self::assertEquals('"ok"', $response->getBody());
|
2021-11-12 22:03:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testXml()
|
|
|
|
{
|
2021-11-21 21:52:36 +01:00
|
|
|
$test = new Test(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml']);
|
|
|
|
$response = $test->run();
|
2021-11-12 22:03:41 +01:00
|
|
|
|
2021-11-21 23:37:17 +01:00
|
|
|
self::assertxml($response->getBody(), 'ok');
|
2021-11-12 22:03:41 +01:00
|
|
|
}
|
|
|
|
}
|