1
0
Fork 0

Statically set "nickname" for user-field in API tests, because there is no authentication action.

This commit is contained in:
Philipp Holzer 2020-08-21 16:21:36 +02:00
parent 3c35901380
commit 6e45fd49f3
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD

View file

@ -2869,6 +2869,7 @@ class ApiTest extends FixtureTest
*/
public function testApiDirectMessagesNewWithScreenName()
{
$this->app->user = ['nickname' => $this->selfUser['nick']];
$_POST['text'] = 'message_text';
$_POST['screen_name'] = $this->friendUser['nick'];
$result = api_direct_messages_new('json');
@ -2884,6 +2885,7 @@ class ApiTest extends FixtureTest
*/
public function testApiDirectMessagesNewWithTitle()
{
$this->app->user = ['nickname' => $this->selfUser['nick']];
$_POST['text'] = 'message_text';
$_POST['screen_name'] = $this->friendUser['nick'];
$_REQUEST['title'] = 'message_title';
@ -2901,6 +2903,7 @@ class ApiTest extends FixtureTest
*/
public function testApiDirectMessagesNewWithRss()
{
$this->app->user = ['nickname' => $this->selfUser['nick']];
$_POST['text'] = 'message_text';
$_POST['screen_name'] = $this->friendUser['nick'];
$result = api_direct_messages_new('rss');