adding functionality to testrunnner to spscify both group name and classname on the command line
This commit is contained in:
parent
810b1d6623
commit
42e76aa7a3
@ -423,8 +423,8 @@ if (PHP_SAPI === "cli") {
|
||||
}
|
||||
|
||||
$argv = $_SERVER["argv"];
|
||||
$coverage = false;
|
||||
array_shift($argv);
|
||||
$coverage = false;
|
||||
if(isset($argv[0]) && $argv[0] == "coverage"){
|
||||
array_shift($argv);
|
||||
$coverage = true;
|
||||
@ -434,6 +434,9 @@ if( ! empty($argv)) {
|
||||
$testGroup = new GroupTest("Custom");
|
||||
foreach($argv as $group) {
|
||||
if( ! isset($$group)) {
|
||||
if (class_exists($group)) {
|
||||
$testGroup->addTestCase(new $group);
|
||||
}
|
||||
die($group . " is not a valid group of tests\n");
|
||||
}
|
||||
$testGroup->addTestCase($$group);
|
||||
|
Loading…
x
Reference in New Issue
Block a user