ENHANCEMENT Running TestRunner tests suites alphabetically through natcasesort() instead of using the (relatively arbitrary) class ordering from ClassInfo::getSubclassesFor()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75793 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-04-30 23:52:55 +00:00
parent 7e41cc2b8e
commit b5bd96b07b

View File

@ -150,6 +150,7 @@ class TestRunner extends Controller {
// run tests before outputting anything to the client
$suite = new PHPUnit_Framework_TestSuite();
natcasesort($classList);
foreach($classList as $className) {
// Ensure that the autoloader pulls in the test class, as PHPUnit won't know how to do this.
class_exists($className);
@ -165,7 +166,7 @@ class TestRunner extends Controller {
self::$default_reporter->writeHeader("Sapphire Test Runner");
if (count($classList) > 1) {
self::$default_reporter->writeInfo("All Tests", "Running test cases: " . implode(", ", $classList));
self::$default_reporter->writeInfo("All Tests", "Running test cases: " . implode(",", $classList));
} else {
self::$default_reporter->writeInfo($classList[0], "");
}