function bodyMatchesJson($constraints) { return Assert::logicalAnd(hasContentType('application/json'), bodyMatches(Assert::logicalAnd(Assert::isJson(), new JsonValueMatchesMany($constraints)))); }
public function testHasContentTypeSucceedsWithCharset() { assertThat(new Response(200, ['content-type' => ['application/json;charset=utf8']]), hasContentType('application/json')); }