Skip to content
Permalink
Browse files

Update Dependencies

  • Loading branch information...
midnite81 committed Jul 28, 2018
1 parent 70bb159 commit a3d9b42da3781404cf00891637f353a221cded97
Showing with 23 additions and 1 deletion.
  1. +1 −1 composer.json
  2. +22 −0 tests/Services/ResponseTest.php
@@ -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": {
@@ -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
*/

0 comments on commit a3d9b42

Please sign in to comment.
You can’t perform that action at this time.