📅  最后修改于: 2022-03-11 15:04:34.980000             🧑  作者: Mango
public function testDemo()
{
$failures = [];
try {
$this->assertTrue(false);
} catch(PHPUnit_Framework_ExpectationFailedException $e) {
$failures[] = $e->getMessage();
}
try {
$this->assertTrue(false);
} catch(PHPUnit_Framework_ExpectationFailedException $e) {
$failures[] = $e->getMessage();
}
if(!empty($failures))
{
throw new PHPUnit_Framework_ExpectationFailedException (
count($failures)." assertions failed:\n\t".implode("\n\t", $failures)
);
}
}