Skip to content

Commit

Permalink
Update Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
midnite81 committed Jul 28, 2018
1 parent 70bb159 commit a3d9b42
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"phpunit/phpunit": "^6|^7",
"mockery/mockery": "^1.1",
"satooshi/php-coveralls": "1.0.*",
"symfony/finder": "^4.1"
"symfony/finder": "^3.4|^4.1"
},
"autoload": {
"psr-4": {
Expand Down
22 changes: 22 additions & 0 deletions tests/Services/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,28 @@ public function it_constructs()
$this->assertInstanceOf(Response::class, $this->response);
}

/**
* @test
*/
public function it_returns_json_when_hitting_the_to_string_method()
{
$response = $this->response . '';
$responseArray = json_decode($response, true);

$this->assertInternalType('string', $response);
$this->assertJson($response);

$this->assertArrayHasKey('isSuccess', $responseArray);
$this->assertArrayHasKey('isError', $responseArray);
$this->assertArrayHasKey('statusCode', $responseArray);
$this->assertArrayHasKey('remaining', $responseArray);
$this->assertArrayHasKey('resetDate', $responseArray);
$this->assertArrayHasKey('errorCode', $responseArray);
$this->assertArrayHasKey('errorMessage', $responseArray);
$this->assertArrayHasKey('retrieveApiKey', $responseArray);
$this->assertArrayHasKey('retrieveToken', $responseArray);
}

/**
* @test
*/
Expand Down

0 comments on commit a3d9b42

Please sign in to comment.