Update Robo test debug rule to accept individual test file paths

This commit is contained in:
Tautvidas Sipavičius
2017-07-28 14:36:40 +03:00
parent 6de746162e
commit f3a1e1b447

View File

@@ -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');
}
}
}