]> git.mxchange.org Git - friendica.git/blob - tests/src/Module/Api/Mastodon/Timelines/HomeTest.php
Fix test
[friendica.git] / tests / src / Module / Api / Mastodon / Timelines / HomeTest.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 HomeTest extends ApiTest
8 {
9         /**
10          * Test the api_statuses_home_timeline() function.
11          *
12          * @return void
13          */
14         public function testApiStatusesHomeTimeline()
15         {
16                 self::markTestIncomplete('Needs Home to not set header during call (like at BaseApi::setLinkHeader');
17
18                 /*
19                 $_REQUEST['max_id']          = 10;
20                 $_REQUEST['exclude_replies'] = true;
21                 $_REQUEST['conversation_id'] = 1;
22                 $result                      = api_statuses_home_timeline('json');
23                 self::assertNotEmpty($result['status']);
24                 foreach ($result['status'] as $status) {
25                         self::assertStatus($status);
26                 }
27                 */
28         }
29
30         /**
31          * Test the api_statuses_home_timeline() function with a negative page parameter.
32          *
33          * @return void
34          */
35         public function testApiStatusesHomeTimelineWithNegativePage()
36         {
37                 self::markTestIncomplete('Needs Home to not set header during call (like at BaseApi::setLinkHeader');
38
39                 /*
40                 $_REQUEST['page'] = -2;
41                 $result           = api_statuses_home_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_home_timeline() with an unallowed user.
51          *
52          * @return void
53          */
54         public function testApiStatusesHomeTimelineWithUnallowedUser()
55         {
56                 self::markTestIncomplete('Needs Home to not set header during call (like at BaseApi::setLinkHeader');
57
58                 /*
59                 $this->expectException(\Friendica\Network\HTTPException\UnauthorizedException::class);
60                 BasicAuth::setCurrentUserID();
61                 api_statuses_home_timeline('json');
62                 */
63         }
64
65         /**
66          * Test the api_statuses_home_timeline() function with an RSS result.
67          *
68          * @return void
69          */
70         public function testApiStatusesHomeTimelineWithRss()
71         {
72                 self::markTestIncomplete('Needs Home to not set header during call (like at BaseApi::setLinkHeader');
73
74                 // $result = api_statuses_home_timeline('rss');
75                 // self::assertXml($result, 'statuses');
76         }
77 }