From: Hypolite Petovan Date: Sat, 2 Mar 2019 21:11:56 +0000 (-0500) Subject: Update tests about api_show_status() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bb78768fb234b56086ce71400dab91f6e76d9b9f;p=friendica.git Update tests about api_show_status() - Remove testApiStatusShowWithRaw() - Add testApiGetLastStatus() - Mark testApiStatusShowWithJson() and testApiStatusShowWithXml() as skipped as they require an item id --- diff --git a/tests/include/ApiTest.php b/tests/include/ApiTest.php index 3d7e5bcfb6..39f4ef79c2 100644 --- a/tests/include/ApiTest.php +++ b/tests/include/ApiTest.php @@ -1274,8 +1274,10 @@ class ApiTest extends DatabaseTest * Test the api_status_show() function. * @return void */ - public function testApiStatusShow() + public function testApiStatusShowWithJson() { + $this->markTestSkipped('This test requires an item ID'); + $result = api_status_show('json'); $this->assertStatus($result['status']); } @@ -1286,6 +1288,8 @@ class ApiTest extends DatabaseTest */ public function testApiStatusShowWithXml() { + $this->markTestSkipped('This test requires an item ID'); + $result = api_status_show('xml'); $this->assertXml($result, 'statuses'); } @@ -1294,9 +1298,11 @@ class ApiTest extends DatabaseTest * Test the api_status_show() function with a raw result. * @return void */ - public function testApiStatusShowWithRaw() + public function testApiGetLastStatus() { - $this->assertStatus(api_status_show('raw')); + $user_info = api_get_user($this->app); + + $this->assertStatus(api_get_last_status($user_info['pid'], $user_info['uid'])); } /**