From 0b08730a0b2cde30f4c392f8b22b536b9b512d80 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 30 Dec 2021 21:56:22 +0100 Subject: [PATCH] Move getAttachement tests --- tests/legacy/ApiTest.php | 32 -------------------- tests/src/Model/Post/MediaTest.php | 48 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 32 deletions(-) create mode 100644 tests/src/Model/Post/MediaTest.php diff --git a/tests/legacy/ApiTest.php b/tests/legacy/ApiTest.php index 206dff2a8..fa1afbe6e 100644 --- a/tests/legacy/ApiTest.php +++ b/tests/legacy/ApiTest.php @@ -679,39 +679,7 @@ class ApiTest extends FixtureTest // api_statuses_mediap('json'); } - /** - * Test the api_get_attachments() function. - * - * @return void - */ - public function testApiGetAttachments() - { - // $body = 'body'; - // self::assertEmpty(api_get_attachments($body, 0)); - } - /** - * Test the api_get_attachments() function with an img tag. - * - * @return void - */ - public function testApiGetAttachmentsWithImage() - { - // $body = '[img]http://via.placeholder.com/1x1.png[/img]'; - // self::assertIsArray(api_get_attachments($body, 0)); - } - - /** - * Test the api_get_attachments() function with an img tag and an AndStatus user agent. - * - * @return void - */ - public function testApiGetAttachmentsWithImageAndAndStatus() - { - // $_SERVER['HTTP_USER_AGENT'] = 'AndStatus'; - // $body = '[img]http://via.placeholder.com/1x1.png[/img]'; - // self::assertIsArray(api_get_attachments($body, 0)); - } /** * Test the api_get_entitities() function. diff --git a/tests/src/Model/Post/MediaTest.php b/tests/src/Model/Post/MediaTest.php new file mode 100644 index 000000000..ee675524b --- /dev/null +++ b/tests/src/Model/Post/MediaTest.php @@ -0,0 +1,48 @@ +