From de1e839a2b85ac1c04b371f343b6c26a263557b6 Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 12 Nov 2021 22:12:28 +0100 Subject: [PATCH] Migrate API\StatusNetVersion --- tests/legacy/ApiTest.php | 12 ------------ .../Api/GnuSocial/GnuSocial/VersionTest.php | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 tests/src/Module/Api/GnuSocial/GnuSocial/VersionTest.php diff --git a/tests/legacy/ApiTest.php b/tests/legacy/ApiTest.php index 3bf14a31bc..b51e0bb1b2 100644 --- a/tests/legacy/ApiTest.php +++ b/tests/legacy/ApiTest.php @@ -2792,18 +2792,6 @@ class ApiTest extends FixtureTest self::assertEquals(30, $result['config']['site']['shorturllength']); } - /** - * Test the api_statusnet_version() function. - * - * @return void - */ - public function testApiStatusnetVersion() - { - // @todo How to test the new API? - // $result = api_statusnet_version('json'); - // self::assertEquals('0.9.7', $result['version']); - } - /** * Test the api_direct_messages_new() function. * diff --git a/tests/src/Module/Api/GnuSocial/GnuSocial/VersionTest.php b/tests/src/Module/Api/GnuSocial/GnuSocial/VersionTest.php new file mode 100644 index 0000000000..454b8ef40d --- /dev/null +++ b/tests/src/Module/Api/GnuSocial/GnuSocial/VersionTest.php @@ -0,0 +1,19 @@ + 'json']); + + $result = json_decode(ApiResponseDouble::getOutput()); + + self::assertEquals('0.9.7', $result); + } +}