Move getAttachement tests

pull/11127/head
Philipp 2021-12-30 21:56:22 +01:00
parent c03ddf0891
commit 0b08730a0b
No known key found for this signature in database
GPG Key ID: 24A7501396EB5432
2 changed files with 48 additions and 32 deletions

View 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.

View File

@ -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));
}
}