3 namespace Friendica\Test\src\Module\Api\Mastodon;
5 use Friendica\Test\src\Module\Api\ApiTest;
7 class ConversationsTest extends ApiTest
10 * Test the api_conversation_show() function.
14 public function testApiConversationShow()
16 // $this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
17 // api_conversation_show('json');
21 * Test the api_conversation_show() function with an ID.
25 public function testApiConversationShowWithId()
28 DI::args()->setArgv(['', '', '', 1]);
29 $_REQUEST['max_id'] = 10;
30 $_REQUEST['page'] = -2;
31 $result = api_conversation_show('json');
32 self::assertNotEmpty($result['status']);
33 foreach ($result['status'] as $status) {
34 self::assertStatus($status);
40 * Test the api_conversation_show() function with an unallowed user.
44 public function testApiConversationShowWithUnallowedUser()
46 // $this->expectException(\Friendica\Network\HTTPException\UnauthorizedException::class);
47 // BasicAuth::setCurrentUserID();
48 // api_conversation_show('json');