protected function seeJsonContains(array $data, $negate = false)
{
$method = $negate ? 'assertFalse' : 'assertTrue';
$actual = json_encode($this->sortRecursive(json_decode($this->response->content(), true)));
foreach ($this->sortRecursive($data) as $key => $value) {
$expected = $this->formatToExpectedJson($key, $value);
$this->phpunit->{$method}(strpos($actual, $expected) !== false, ($negate ? 'Found unexpected' : 'Unable to find') . " JSON fragment [{$expected}] within [{$actual}].");
}
return $this;
}