@@ -30,7 +30,11 @@ protected function configure()
3030 $ this ->setName ('phpunit ' )
3131 ->setDescription ('Run PHPUnit on a plugin ' )
3232 ->addOption ('coverage-text ' , null , InputOption::VALUE_NONE , 'Generate and print code coverage report in text format ' )
33- ->addOption ('coverage-clover ' , null , InputOption::VALUE_NONE , 'Generate code coverage report in Clover XML format ' );
33+ ->addOption ('coverage-clover ' , null , InputOption::VALUE_NONE , 'Generate code coverage report in Clover XML format ' )
34+ ->addOption ('fail-on-incomplete ' , null , InputOption::VALUE_NONE , 'Treat incomplete tests as failures ' )
35+ ->addOption ('fail-on-risky ' , null , InputOption::VALUE_NONE , 'Treat risky tests as failures ' )
36+ ->addOption ('fail-on-skipped ' , null , InputOption::VALUE_NONE , 'Treat skipped tests as failures ' )
37+ ->addOption ('fail-on-warning ' , null , InputOption::VALUE_NONE , 'Treat tests with warnings as failures ' );
3438 }
3539
3640 protected function initialize (InputInterface $ input , OutputInterface $ output )
@@ -74,6 +78,11 @@ private function resolveOptions(InputInterface $input)
7478 if ($ this ->supportsCoverage () && $ input ->getOption ('coverage-clover ' )) {
7579 $ options [] = sprintf ('--coverage-clover %s/coverage.xml ' , getcwd ());
7680 }
81+ foreach (['fail-on-warning ' , 'fail-on-risky ' , 'fail-on-skipped ' , 'fail-on-warning ' ] as $ option ) {
82+ if ($ input ->getOption ($ option )) {
83+ $ options [] = '-- ' .$ option ;
84+ }
85+ }
7786 if (is_file ($ this ->plugin ->directory .'/phpunit.xml ' )) {
7887 $ options [] = sprintf ('--configuration %s ' , $ this ->plugin ->directory );
7988 } else {
0 commit comments