protected function assertTestsAreSuccessful(PHPUnit_Framework_TestResult $result)
{
if ($result->wasSuccessful()) {
return;
}
$msg = "Test should pass, instead there are {$result->errorCount()} errors:\n";
/** @var $error PHPUnit_Framework_TestFailure */
foreach ($result->errors() as $error) {
$msg .= $error->exceptionMessage();
}
$this->fail($msg);
}