Get PHPUnit Classes
bool $name_only: If TRUE, returns a flat array of class names only.
function simpletest_phpunit_get_available_tests() {
// Load the PHPUnit configuration file, which tells us where to find the
// tests.
$phpunit_config = simpletest_phpunit_configuration_filepath();
$configuration = PHPUnit_Util_Configuration::getInstance($phpunit_config);
// Find all the tests and get a list of unique class names.
$test_suite = $configuration
->getTestSuiteConfiguration(NULL);
$test_classes = array();
foreach ($test_suite as $test) {
$name = get_class($test);
if (!array_key_exists($name, $test_classes)) {
$test_classes[$name] = $test
->getInfo();
}
}
return $test_classes;
}