Skip to content

Commit 8fd284c

Browse files
committed
Test for rawGet()
1 parent 9d643ea commit 8fd284c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/Databox/Tests/ClientTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ public function testRawPush()
4242
$this->assertEquals($json, json_encode($client->rawPush()));
4343
}
4444

45+
public function testRawGet()
46+
{
47+
$client = $this->getMockBuilder('Databox\Client')
48+
->setMethods(['get'])
49+
->getMock();
50+
51+
$json = '[]';
52+
$response = new Response(200, [], $json);
53+
$client->method('get')->willReturn($response);
54+
$this->assertEquals($json, json_encode([]));
55+
}
56+
4557
public function testLastPush()
4658
{
4759
$this->client->method('rawGet')->willReturn([

0 commit comments

Comments
 (0)