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