friendica/tests/src/Module/Api/GnuSocial/Help/TestTest.php

28 lines
598 B
PHP
Raw Normal View History

2021-11-12 22:03:41 +01:00
<?php
namespace Friendica\Test\src\Module\Api\GnuSocial\Help;
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;
use Friendica\Test\Util\ApiResponseDouble;
class TestTest extends ApiTest
{
public function testJson()
{
$test = new Test(DI::l10n(), ['extension' => 'json']);
2021-11-14 23:35:01 +01:00
$test->rawContent();
2021-11-12 22:03:41 +01:00
self::assertEquals('"ok"', ApiResponseDouble::getOutput());
}
public function testXml()
{
$test = new Test(DI::l10n(), ['extension' => 'xml']);
2021-11-14 23:35:01 +01:00
$test->rawContent();
2021-11-12 22:03:41 +01:00
self::assertxml(ApiResponseDouble::getOutput(), 'ok');
}
}