Statically set "nickname" for user-field in API tests, because there is no authentication action.
This commit is contained in:
parent
3c35901380
commit
6e45fd49f3
1 changed files with 3 additions and 0 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue