Update Robo test debug rule to accept individual test file paths
This commit is contained in:
14
RoboFile.php
14
RoboFile.php
@@ -199,10 +199,16 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
return $this->_exec($command);
|
return $this->_exec($command);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDebug() {
|
function testDebug($opts=['file' => null, 'xml' => false]) {
|
||||||
$this->_exec('vendor/bin/codecept build');
|
|
||||||
$this->loadEnv();
|
$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() {
|
function testFailed() {
|
||||||
@@ -415,4 +421,4 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
require_once(ABSPATH . WPINC . '/plugin.php');
|
require_once(ABSPATH . WPINC . '/plugin.php');
|
||||||
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user