Skip to content

Commit

Permalink
Fixed default response
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Demyanovsky committed Apr 16, 2018
1 parent c2f02ba commit b0e9d0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Formatter.php
Expand Up @@ -45,7 +45,7 @@ public function toArray()
}

if ($this->imposter->getDefaultResponse()) {
$array['defaultResponse'] = $this->responseToArray($this->imposter->getDefaultResponse());
$array['defaultResponse'] = $this->imposter->getDefaultResponse()->getConfig();
}

return $array;
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/FormatterTest.php
Expand Up @@ -64,7 +64,7 @@ public function testHttps()
->setKey('key')
->setCert('cert')
->setMutualAuth(true)
->setDefaultResponse(new Response(Response::TYPE_IS))
->setDefaultResponse(new Response())
->setAllowCORS(true);

$formatter = new Formatter($imposter);
Expand Down Expand Up @@ -126,7 +126,7 @@ public function testHttp()
->setPort(1234)
->setProtocol(Imposter::PROTOCOL_HTTP)
->addStub($stub)
->setDefaultResponse(new Response(Response::TYPE_IS))
->setDefaultResponse(new Response())
->setAllowCORS(true);

$formatter = new Formatter($imposter);
Expand Down

0 comments on commit b0e9d0e

Please sign in to comment.