Skip to content

Commit

Permalink
Merge pull request #40 from rux15/master
Browse files Browse the repository at this point in the history
Added test for responses without data
  • Loading branch information
tim-bezhashvyly authored Sep 1, 2017
2 parents e10f173 + 326b60c commit f7bfe4a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/Unit/Suites/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public function testItSetsAndGetsReplyText()
$this->assertEquals('OK', $result->getReplyText());
}

public function testItResponseWithoutData()
{
$expectedResponse = $this->createExpectedResponse('insertRecord');
$result = new Response($expectedResponse);

$this->assertEmpty($result->getData());
}

/**
* @param string $fileName
* @return mixed
Expand Down
4 changes: 4 additions & 0 deletions tests/Unit/Suites/TestData/insertRecord.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"replyCode": 0,
"replyText": "Rows inserted: 1"
}

0 comments on commit f7bfe4a

Please sign in to comment.