diff --git a/src/Json/JsonSchema.php b/src/Json/JsonSchema.php index 25bb246..07e7e10 100644 --- a/src/Json/JsonSchema.php +++ b/src/Json/JsonSchema.php @@ -25,7 +25,7 @@ public function resolve(RefResolver $resolver) throw new \LogicException('Cannot resolve JsonSchema without uri parameter'); } - $resolver->resolve($this->encode(false), $this->uri); + $resolver->resolve($this->getRawContent(), $this->uri); return $this; } diff --git a/src/RestApiContext.php b/src/RestApiContext.php index 0ce8cc9..8244a01 100644 --- a/src/RestApiContext.php +++ b/src/RestApiContext.php @@ -72,7 +72,7 @@ public function theResponseCodeShouldBe($code) { $expected = intval($code); $actual = intval($this->response->getStatusCode()); - $this->asserter->variable($actual)->isEqualTo($code); + $this->asserter->variable($actual)->isEqualTo($expected); } /** @@ -91,8 +91,8 @@ public function iAddHeaderEqualTo($headerName, $headerValue) public function iSetBasicAuthenticationWithAnd($username, $password) { $this->removeHeader('Authorization'); - $this->authorization = base64_encode($username . ':' . $password); - $this->addHeader('Authorization', 'Basic ' . $this->authorization); + $authorization = base64_encode($username . ':' . $password); + $this->addHeader('Authorization', 'Basic ' . $authorization); } /** diff --git a/tests/Units/Json/JsonSchema.php b/tests/Units/Json/JsonSchema.php index 5ee2a7f..f99acd0 100644 --- a/tests/Units/Json/JsonSchema.php +++ b/tests/Units/Json/JsonSchema.php @@ -40,7 +40,7 @@ public function test_should_resolve_with_uri() ) ->mock($resolver) ->call('resolve') - ->withArguments('{}', 'file://test') + ->withArguments(new \stdClass, 'file://test') ->once() ->object($result)