]> git.mxchange.org Git - friendica.git/commitdiff
Move getAttachement tests
authorPhilipp <admin@philipp.info>
Thu, 30 Dec 2021 20:56:22 +0000 (21:56 +0100)
committerPhilipp <admin@philipp.info>
Thu, 30 Dec 2021 20:56:22 +0000 (21:56 +0100)
tests/legacy/ApiTest.php
tests/src/Model/Post/MediaTest.php [new file with mode: 0644]

index 206dff2a89de7b1b519d8a0e80e336d2f1a56231..fa1afbe6edc90b6c39ae01b7e4d1884007f7f648 100644 (file)
@@ -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 (file)
index 0000000..ee67552
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+
+namespace Friendica\Test\src\Model\Post;
+
+use Friendica\Test\MockedTest;
+
+class MediaTest extends MockedTest
+{
+       /**
+        * Test the api_get_attachments() function.
+        *
+        * @return void
+        */
+       public function testApiGetAttachments()
+       {
+               self::markTestIncomplete('Needs Model\Post\Media refactoring first.');
+
+               // $body = 'body';
+               // self::assertEmpty(api_get_attachments($body, 0));
+       }
+
+       /**
+        * Test the api_get_attachments() function with an img tag.
+        *
+        * @return void
+        */
+       public function testApiGetAttachmentsWithImage()
+       {
+               self::markTestIncomplete('Needs Model\Post\Media refactoring first.');
+
+               // $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()
+       {
+               self::markTestIncomplete('Needs Model\Post\Media refactoring first.');
+
+               // $_SERVER['HTTP_USER_AGENT'] = 'AndStatus';
+               // $body                       = '[img]http://via.placeholder.com/1x1.png[/img]';
+               // self::assertIsArray(api_get_attachments($body, 0));
+       }
+}