public function PHPUnit_Util_TestDox_NamePrettifier::prettifyTestClass in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php \PHPUnit_Util_TestDox_NamePrettifier::prettifyTestClass()
Prettifies the name of a test class.
Parameters
string $name:
Return value
string
File
- vendor/
phpunit/ phpunit/ src/ Util/ TestDox/ NamePrettifier.php, line 39
Class
- PHPUnit_Util_TestDox_NamePrettifier
- Prettifies class and method names for use in TestDox documentation.
Code
public function prettifyTestClass($name) {
$title = $name;
if ($this->suffix !== null && $this->suffix == substr($name, -1 * strlen($this->suffix))) {
$title = substr($title, 0, strripos($title, $this->suffix));
}
if ($this->prefix !== null && $this->prefix == substr($name, 0, strlen($this->prefix))) {
$title = substr($title, strlen($this->prefix));
}
if (substr($title, 0, 1) == '\\') {
$title = substr($title, 1);
}
return $title;
}