Le message d'exception phpunit contient des chaînes
if(count($errors) > 0) throw new \Exception(trim(implode(" ", $errors)), 101);
Tiago F2
if(count($errors) > 0) throw new \Exception(trim(implode(" ", $errors)), 101);
try {
$myClass->validate(1, 2, 4, 3);
$this->fail( "Exception with 101 code should be thrown" );
} catch (Exception $e) {
$this->assertEquals( 101, $e->getCode());
}