PHPUnit_Framework_Test $test:
boolean $asString:
mixed
public static function describe(PHPUnit_Framework_Test $test, $asString = TRUE) {
if ($asString) {
if ($test instanceof PHPUnit_Framework_SelfDescribing) {
return $test
->toString();
}
else {
return get_class($test);
}
}
else {
if ($test instanceof PHPUnit_Framework_TestCase) {
return array(
get_class($test),
$test
->getName(),
);
}
else {
if ($test instanceof PHPUnit_Framework_SelfDescribing) {
return array(
'',
$test
->toString(),
);
}
else {
return array(
'',
get_class($test),
);
}
}
}
}