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 self::markTestIncomplete('Needs Conversations to not set header during call (like at BaseApi::setLinkHeader');
18 // $this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
19 // api_conversation_show('json');
23 * Test the api_conversation_show() function with an ID.
27 public function testApiConversationShowWithId()
29 self::markTestIncomplete('Needs Conversations to not set header during call (like at BaseApi::setLinkHeader');
32 DI::args()->setArgv(['', '', '', 1]);
33 $_REQUEST['max_id'] = 10;
34 $_REQUEST['page'] = -2;
35 $result = api_conversation_show('json');
36 self::assertNotEmpty($result['status']);
37 foreach ($result['status'] as $status) {
38 self::assertStatus($status);
44 * Test the api_conversation_show() function with an unallowed user.
48 public function testApiConversationShowWithUnallowedUser()
50 self::markTestIncomplete('Needs Conversations to not set header during call (like at BaseApi::setLinkHeader');
52 // $this->expectException(\Friendica\Network\HTTPException\UnauthorizedException::class);
53 // BasicAuth::setCurrentUserID();
54 // api_conversation_show('json');