mirror of
https://github.com/friendica/friendica
synced 2024-12-23 07:20:15 +00:00
Fixing tests
This commit is contained in:
parent
7e49ee8fb5
commit
ff9786f3c3
1 changed files with 10 additions and 10 deletions
|
@ -2568,9 +2568,9 @@ class ApiTest extends FixtureTest
|
||||||
public function testApiDirectMessagesNewWithScreenName()
|
public function testApiDirectMessagesNewWithScreenName()
|
||||||
{
|
{
|
||||||
$this->app->setLoggedInUserNickname($this->selfUser['nick']);
|
$this->app->setLoggedInUserNickname($this->selfUser['nick']);
|
||||||
$_POST['text'] = 'message_text';
|
$_POST['text'] = 'message_text';
|
||||||
$_POST['screen_name'] = $this->friendUser['nick'];
|
$_POST['user_id'] = $this->friendUser['id'];
|
||||||
$result = api_direct_messages_new('json');
|
$result = api_direct_messages_new('json');
|
||||||
self::assertStringContainsString('message_text', $result['direct_message']['text']);
|
self::assertStringContainsString('message_text', $result['direct_message']['text']);
|
||||||
self::assertEquals('selfcontact', $result['direct_message']['sender_screen_name']);
|
self::assertEquals('selfcontact', $result['direct_message']['sender_screen_name']);
|
||||||
self::assertEquals(1, $result['direct_message']['friendica_seen']);
|
self::assertEquals(1, $result['direct_message']['friendica_seen']);
|
||||||
|
@ -2584,10 +2584,10 @@ class ApiTest extends FixtureTest
|
||||||
public function testApiDirectMessagesNewWithTitle()
|
public function testApiDirectMessagesNewWithTitle()
|
||||||
{
|
{
|
||||||
$this->app->setLoggedInUserNickname($this->selfUser['nick']);
|
$this->app->setLoggedInUserNickname($this->selfUser['nick']);
|
||||||
$_POST['text'] = 'message_text';
|
$_POST['text'] = 'message_text';
|
||||||
$_POST['screen_name'] = $this->friendUser['nick'];
|
$_POST['user_id'] = $this->friendUser['id'];
|
||||||
$_REQUEST['title'] = 'message_title';
|
$_REQUEST['title'] = 'message_title';
|
||||||
$result = api_direct_messages_new('json');
|
$result = api_direct_messages_new('json');
|
||||||
self::assertStringContainsString('message_text', $result['direct_message']['text']);
|
self::assertStringContainsString('message_text', $result['direct_message']['text']);
|
||||||
self::assertStringContainsString('message_title', $result['direct_message']['text']);
|
self::assertStringContainsString('message_title', $result['direct_message']['text']);
|
||||||
self::assertEquals('selfcontact', $result['direct_message']['sender_screen_name']);
|
self::assertEquals('selfcontact', $result['direct_message']['sender_screen_name']);
|
||||||
|
@ -2602,9 +2602,9 @@ class ApiTest extends FixtureTest
|
||||||
public function testApiDirectMessagesNewWithRss()
|
public function testApiDirectMessagesNewWithRss()
|
||||||
{
|
{
|
||||||
$this->app->setLoggedInUserNickname($this->selfUser['nick']);
|
$this->app->setLoggedInUserNickname($this->selfUser['nick']);
|
||||||
$_POST['text'] = 'message_text';
|
$_POST['text'] = 'message_text';
|
||||||
$_POST['screen_name'] = $this->friendUser['nick'];
|
$_POST['user_id'] = $this->friendUser['id'];
|
||||||
$result = api_direct_messages_new('rss');
|
$result = api_direct_messages_new('rss');
|
||||||
self::assertXml($result, 'direct-messages');
|
self::assertXml($result, 'direct-messages');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue