3 * @copyright Copyright (C) 2010-2023, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 namespace Friendica\Test\src\Model\Post;
24 use Friendica\Test\MockedTest;
26 class MediaTest extends MockedTest
29 * Test the api_get_attachments() function.
33 public function testApiGetAttachments()
35 self::markTestIncomplete('Needs Model\Post\Media refactoring first.');
38 // self::assertEmpty(api_get_attachments($body, 0));
42 * Test the api_get_attachments() function with an img tag.
46 public function testApiGetAttachmentsWithImage()
48 self::markTestIncomplete('Needs Model\Post\Media refactoring first.');
50 // $body = '[img]http://via.placeholder.com/1x1.png[/img]';
51 // self::assertIsArray(api_get_attachments($body, 0));
55 * Test the api_get_attachments() function with an img tag and an AndStatus user agent.
59 public function testApiGetAttachmentsWithImageAndAndStatus()
61 self::markTestIncomplete('Needs Model\Post\Media refactoring first.');
63 // $_SERVER['HTTP_USER_AGENT'] = 'AndStatus';
64 // $body = '[img]http://via.placeholder.com/1x1.png[/img]';
65 // self::assertIsArray(api_get_attachments($body, 0));