|
|
@ -44,9 +44,10 @@ use Throwable; |
|
|
|
Examples : |
|
|
|
Examples : |
|
|
|
composer seacms-test phpunit -- -h : display phpunit help (do not forget --) |
|
|
|
composer seacms-test phpunit -- -h : display phpunit help (do not forget --) |
|
|
|
composer seacms-test phpunit -- --pversion : display phpunit version |
|
|
|
composer seacms-test phpunit -- --pversion : display phpunit version |
|
|
|
composer seacms-test help : show this help |
|
|
|
composer seacms-test help : show this help |
|
|
|
composer seacms-test : show this help |
|
|
|
composer seacms-test : show this help |
|
|
|
composer seacms-test test : run tests |
|
|
|
composer seacms-test test : run tests |
|
|
|
|
|
|
|
composer seacms-test test -- --filter AppTest::testInit : run tests with phpunit parameters |
|
|
|
STR) |
|
|
|
STR) |
|
|
|
|
|
|
|
|
|
|
|
->addArgument('type', InputArgument::OPTIONAL, 'phpunit|test') |
|
|
|
->addArgument('type', InputArgument::OPTIONAL, 'phpunit|test') |
|
|
@ -79,12 +80,12 @@ use Throwable; |
|
|
|
] as $path){ |
|
|
|
] as $path){ |
|
|
|
if (is_dir($path)){ |
|
|
|
if (is_dir($path)){ |
|
|
|
$empty = false; |
|
|
|
$empty = false; |
|
|
|
$args = [ |
|
|
|
$newargs = array_merge([ |
|
|
|
'--bootstrap', |
|
|
|
'--bootstrap', |
|
|
|
'vendor/autoload.php', |
|
|
|
'vendor/autoload.php', |
|
|
|
$path |
|
|
|
$path |
|
|
|
]; |
|
|
|
],$args); |
|
|
|
$code = $this->runPhpUnitIfAvailable($args,$output); |
|
|
|
$code = $this->runPhpUnitIfAvailable($newargs,$output); |
|
|
|
if ($code != Command::SUCCESS){ |
|
|
|
if ($code != Command::SUCCESS){ |
|
|
|
return $code; |
|
|
|
return $code; |
|
|
|
} |
|
|
|
} |
|
|
@ -95,7 +96,7 @@ use Throwable; |
|
|
|
} |
|
|
|
} |
|
|
|
return Command::SUCCESS; |
|
|
|
return Command::SUCCESS; |
|
|
|
case 'phpunit': |
|
|
|
case 'phpunit': |
|
|
|
return $this->runPhpUnitIfAvailable($input->getArgument('args'),$output); |
|
|
|
return $this->runPhpUnitIfAvailable($args,$output); |
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
default: |
|
|
|
// default display help |
|
|
|
// default display help |
|
|
|