]> git.mxchange.org Git - friendica.git/blob - tests/src/Module/Api/Mastodon/Timelines/PublicTimelineTest.php
Reenable Twitter/Destroy tests
[friendica.git] / tests / src / Module / Api / Mastodon / Timelines / PublicTimelineTest.php
1 <?php
2
3 namespace Friendica\Test\src\Module\Api\Mastodon\Timelines;
4
5 use Friendica\Test\src\Module\Api\ApiTest;
6
7 class PublicTimelineTest extends ApiTest
8 {
9         /**
10          * Test the api_statuses_public_timeline() function.
11          *
12          * @return void
13          */
14         public function testApiStatusesPublicTimeline()
15         {
16                 self::markTestIncomplete('Needs PublicTimeline to not set header during call (like at BaseApi::setLinkHeader');
17
18                 /*
19                 $_REQUEST['max_id']          = 10;
20                 $_REQUEST['conversation_id'] = 1;
21                 $result                      = api_statuses_public_timeline('json');
22                 self::assertNotEmpty($result['status']);
23                 foreach ($result['status'] as $status) {
24                         self::assertStatus($status);
25                 }
26                 */
27         }
28
29         /**
30          * Test the api_statuses_public_timeline() function with the exclude_replies parameter.
31          *
32          * @return void
33          */
34         public function testApiStatusesPublicTimelineWithExcludeReplies()
35         {
36                 self::markTestIncomplete('Needs PublicTimeline to not set header during call (like at BaseApi::setLinkHeader');
37
38                 /*
39                 $_REQUEST['max_id']          = 10;
40                 $_REQUEST['exclude_replies'] = true;
41                 $result                      = api_statuses_public_timeline('json');
42                 self::assertNotEmpty($result['status']);
43                 foreach ($result['status'] as $status) {
44                         self::assertStatus($status);
45                 }
46                 */
47         }
48
49         /**
50          * Test the api_statuses_public_timeline() function with a negative page parameter.
51          *
52          * @return void
53          */
54         public function testApiStatusesPublicTimelineWithNegativePage()
55         {
56                 self::markTestIncomplete('Needs PublicTimeline to not set header during call (like at BaseApi::setLinkHeader');
57
58                 /*
59                 $_REQUEST['page'] = -2;
60                 $result           = api_statuses_public_timeline('json');
61                 self::assertNotEmpty($result['status']);
62                 foreach ($result['status'] as $status) {
63                         self::assertStatus($status);
64                 }
65                 */
66         }
67
68         /**
69          * Test the api_statuses_public_timeline() function with an unallowed user.
70          *
71          * @return void
72          */
73         public function testApiStatusesPublicTimelineWithUnallowedUser()
74         {
75                 self::markTestIncomplete('Needs PublicTimeline to not set header during call (like at BaseApi::setLinkHeader');
76
77                 // $this->expectException(\Friendica\Network\HTTPException\UnauthorizedException::class);
78                 // BasicAuth::setCurrentUserID();
79                 // api_statuses_public_timeline('json');
80         }
81
82         /**
83          * Test the api_statuses_public_timeline() function with an RSS result.
84          *
85          * @return void
86          */
87         public function testApiStatusesPublicTimelineWithRss()
88         {
89                 self::markTestIncomplete('Needs PublicTimeline to not set header during call (like at BaseApi::setLinkHeader');
90
91                 // $result = api_statuses_public_timeline('rss');
92                 // self::assertXml($result, 'statuses');
93         }
94 }