X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Finclude%2FApiTest.php;h=80a25c20c11fe438f73988ff481e7fe7997d22be;hb=76414a51691dfffefd4de11fe025e44a9a59586a;hp=1eb7ce78d04eb963056388f99c47888ce36af4cf;hpb=06175ede1ed057db459a4f61fe31c2b48cfd564b;p=friendica.git diff --git a/tests/include/ApiTest.php b/tests/include/ApiTest.php index 1eb7ce78d0..80a25c20c1 100644 --- a/tests/include/ApiTest.php +++ b/tests/include/ApiTest.php @@ -31,6 +31,18 @@ class ApiTest extends DatabaseTest */ protected $logOutput; + /** @var App */ + protected $app; + + /** @var array */ + protected $selfUser; + /** @var array */ + protected $friendUser; + /** @var array */ + protected $otherUser; + + protected $wrongUserId; + /** * Create variables used by tests. */ @@ -1272,31 +1284,30 @@ class ApiTest extends DatabaseTest /** * Test the api_status_show() function. - * @return void */ - public function testApiStatusShow() + public function testApiStatusShowWithJson() { - $result = api_status_show('json'); + $result = api_status_show('json', 1); $this->assertStatus($result['status']); } /** * Test the api_status_show() function with an XML result. - * @return void */ public function testApiStatusShowWithXml() { - $result = api_status_show('xml'); + $result = api_status_show('xml', 1); $this->assertXml($result, 'statuses'); } /** - * Test the api_status_show() function with a raw result. - * @return void + * Test the api_get_last_status() function */ - public function testApiStatusShowWithRaw() + public function testApiGetLastStatus() { - $this->assertStatus(api_status_show('raw')); + $item = api_get_last_status($this->selfUser['id'], $this->selfUser['id']); + + $this->assertNotNull($item); } /**