Fix failing test

parent 166b883c
...@@ -114,11 +114,11 @@ class Response ...@@ -114,11 +114,11 @@ class Response
/** /**
* Return result * Return result
* *
* @return mixed * @return array
*/ */
public function getResult() public function getResult()
{ {
return isset($this->result) ? $this->result : null; return isset($this->result) ? $this->result : [];
} }
/** /**
......
...@@ -79,7 +79,7 @@ class ServerResponseTest extends TestCase ...@@ -79,7 +79,7 @@ class ServerResponseTest extends TestCase
$server = new Response(json_decode($result, true), 'testbot'); $server = new Response(json_decode($result, true), 'testbot');
self::assertFalse($server->isOk()); self::assertFalse($server->isOk());
self::assertNull($server->getResult()); self::assertEquals([], $server->getResult());
self::assertEquals('400', $server->getErrorCode()); self::assertEquals('400', $server->getErrorCode());
self::assertEquals('Error: Bad Request: wrong chat id', $server->getDescription()); self::assertEquals('Error: Bad Request: wrong chat id', $server->getDescription());
} }
...@@ -115,7 +115,7 @@ class ServerResponseTest extends TestCase ...@@ -115,7 +115,7 @@ class ServerResponseTest extends TestCase
$server = new Response(json_decode($result, true), 'testbot'); $server = new Response(json_decode($result, true), 'testbot');
self::assertFalse($server->isOk()); self::assertFalse($server->isOk());
self::assertNull($server->getResult()); self::assertEquals([], $server->getResult());
self::assertEquals(400, $server->getErrorCode()); self::assertEquals(400, $server->getErrorCode());
self::assertEquals('Error: Bad request: htttps://domain.host.org/dir/hook.php', $server->getDescription()); self::assertEquals('Error: Bad request: htttps://domain.host.org/dir/hook.php', $server->getDescription());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment