From f3a1e1b447ab66cb6249d8856e5dc93b9c79ad41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tautvidas=20Sipavi=C4=8Dius?= Date: Fri, 28 Jul 2017 14:36:40 +0300 Subject: [PATCH] Update Robo test debug rule to accept individual test file paths --- RoboFile.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 +}