From bb78768fb234b56086ce71400dab91f6e76d9b9f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 2 Mar 2019 16:11:56 -0500 Subject: [PATCH] Update tests about api_show_status() - Remove testApiStatusShowWithRaw() - Add testApiGetLastStatus() - Mark testApiStatusShowWithJson() and testApiStatusShowWithXml() as skipped as they require an item id --- tests/include/ApiTest.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/include/ApiTest.php b/tests/include/ApiTest.php index 3d7e5bcfb..39f4ef79c 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'])); } /**