/** * @covers wishlist\classes\BaseApi::user */ public function testUser() { $result = $this->object->user($GLOBALS['userId']); $this->assertNotEmpty($result); $this->assertInternalType('array', $result); $this->assertGreaterThan(0, $result); //------------If user not exist $result = $this->object->user(400); $this->assertNotEmpty($result); $this->assertInternalType('array', $result); $this->assertRegExp('/Неверний запрос/', $result[0]); }