/** * @param Result $validationResult * @return void */ protected function assertValidationResultContainsNoErrors(Result $validationResult) { if ($validationResult->hasErrors()) { $errors = $validationResult->getFlattenedErrors(); /** @var Error $error */ $output = ''; foreach ($errors as $path => $pathErrors) { foreach ($pathErrors as $error) { $output .= sprintf('%s -> %s' . PHP_EOL, $path, $error->render()); } } $this->fail($output); } $this->assertFalse($validationResult->hasErrors()); }