diff --git a/RoboFile.php b/RoboFile.php index 1f7f015551..c434fe8160 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -199,10 +199,16 @@ class RoboFile extends \Robo\Tasks { return $this->_exec($command); } - function testDebug() { - $this->_exec('vendor/bin/codecept build'); + function testDebug($opts=['file' => null, 'xml' => false]) { $this->loadEnv(); - return $this->_exec('vendor/bin/codecept run unit --debug'); + $this->_exec('vendor/bin/codecept build'); + + $command = 'vendor/bin/codecept run unit --debug -f '.(($opts['file']) ? $opts['file'] : ''); + + if($opts['xml']) { + $command .= ' --xml'; + } + return $this->_exec($command); } function testFailed() { @@ -415,4 +421,4 @@ class RoboFile extends \Robo\Tasks { require_once(ABSPATH . WPINC . '/plugin.php'); require_once(ABSPATH . 'wp-admin/includes/plugin.php'); } -} \ No newline at end of file +}