Fix tests

This commit is contained in:
Michael 2021-07-10 14:02:03 +00:00
parent 07d2dfcd60
commit e5e3143293

View File

@ -2192,9 +2192,9 @@ class ApiTest extends FixtureTest
public function testApiFormatMessages()
{
$result = api_format_messages(
['id' => 1, 'title' => 'item_title', 'body' => '[b]item_body[/b]'],
['id' => 2, 'screen_name' => 'recipient_name'],
['id' => 3, 'screen_name' => 'sender_name']
['id' => 1, 'uri-id' => 1, 'title' => 'item_title', 'body' => '[b]item_body[/b]'],
['id' => 2, 'uri-id' => 2, 'screen_name' => 'recipient_name'],
['id' => 3, 'uri-id' => 2, 'screen_name' => 'sender_name']
);
self::assertEquals('item_title' . "\n" . 'item_body', $result['text']);
self::assertEquals(1, $result['id']);
@ -2213,9 +2213,9 @@ class ApiTest extends FixtureTest
{
$_GET['getText'] = 'html';
$result = api_format_messages(
['id' => 1, 'title' => 'item_title', 'body' => '[b]item_body[/b]'],
['id' => 2, 'screen_name' => 'recipient_name'],
['id' => 3, 'screen_name' => 'sender_name']
['id' => 1, 'uri-id' => 1, 'title' => 'item_title', 'body' => '[b]item_body[/b]'],
['id' => 2, 'uri-id' => 2, 'screen_name' => 'recipient_name'],
['id' => 3, 'uri-id' => 3, 'screen_name' => 'sender_name']
);
self::assertEquals('item_title', $result['title']);
self::assertEquals('<strong>item_body</strong>', $result['text']);
@ -2230,9 +2230,9 @@ class ApiTest extends FixtureTest
{
$_GET['getText'] = 'plain';
$result = api_format_messages(
['id' => 1, 'title' => 'item_title', 'body' => '[b]item_body[/b]'],
['id' => 2, 'screen_name' => 'recipient_name'],
['id' => 3, 'screen_name' => 'sender_name']
['id' => 1, 'uri-id' => 1, 'title' => 'item_title', 'body' => '[b]item_body[/b]'],
['id' => 2, 'uri-id' => 2, 'screen_name' => 'recipient_name'],
['id' => 3, 'uri-id' => 3, 'screen_name' => 'sender_name']
);
self::assertEquals('item_title', $result['title']);
self::assertEquals('item_body', $result['text']);