1
0
Fork 0

Fixing (some) tests

This commit is contained in:
Michael 2021-11-26 10:54:02 +00:00
parent f5a3f8039d
commit 998964c733

View file

@ -2513,9 +2513,9 @@ class ApiTest extends FixtureTest
public function testApiDirectMessagesNewWithScreenName()
{
$this->app->setLoggedInUserNickname($this->selfUser['nick']);
$_POST['text'] = 'message_text';
$_POST['user_id'] = $this->friendUser['id'];
$result = api_direct_messages_new('json');
$_POST['text'] = 'message_text';
$_REQUEST['user_id'] = $this->friendUser['id'];
$result = api_direct_messages_new('json');
self::assertStringContainsString('message_text', $result['direct_message']['text']);
self::assertEquals('selfcontact', $result['direct_message']['sender_screen_name']);
self::assertEquals(1, $result['direct_message']['friendica_seen']);
@ -2529,9 +2529,9 @@ class ApiTest extends FixtureTest
public function testApiDirectMessagesNewWithTitle()
{
$this->app->setLoggedInUserNickname($this->selfUser['nick']);
$_POST['text'] = 'message_text';
$_POST['user_id'] = $this->friendUser['id'];
$_REQUEST['title'] = 'message_title';
$_POST['text'] = 'message_text';
$_REQUEST['user_id'] = $this->friendUser['id'];
$_REQUEST['title'] = 'message_title';
$result = api_direct_messages_new('json');
self::assertStringContainsString('message_text', $result['direct_message']['text']);
self::assertStringContainsString('message_title', $result['direct_message']['text']);
@ -2547,9 +2547,9 @@ class ApiTest extends FixtureTest
public function testApiDirectMessagesNewWithRss()
{
$this->app->setLoggedInUserNickname($this->selfUser['nick']);
$_POST['text'] = 'message_text';
$_POST['user_id'] = $this->friendUser['id'];
$result = api_direct_messages_new('rss');
$_POST['text'] = 'message_text';
$_REQUEST['user_id'] = $this->friendUser['id'];
$result = api_direct_messages_new('rss');
self::assertXml($result, 'direct-messages');
}