/**
* Prettifies the name of a test class.
*
* This method will return $testClass unchanged if human-readable names
* are disabled.
*
* @param string $testClassName a camel-case test class name, must not be empty
*
* @return string the prettified test class name, will not be empty
*/
protected function prettifyTestClass($testClassName)
{
if (!$this->useHumanReadableTextFormat) {
return $testClassName;
}
$testClassNameWithoutPrefixOrSuffix = preg_replace('/(tx_|Tx_)?(.+)(Test|_testcase)$/', '\\2', $testClassName);
$testClassNameWithoutUnderScores = str_replace('_', ' ', $testClassNameWithoutPrefixOrSuffix);
$this->namePrettifier->setPrefix(null);
$this->namePrettifier->setSuffix(null);
return $this->namePrettifier->prettifyTestClass($testClassNameWithoutUnderScores);
}