From b171a10759caddd279e6bb5240b263b94a9cdd8d Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Fri, 2 Oct 2015 21:53:39 +0100 Subject: [PATCH] Fixing Codeception plugin PHPCS errors. --- PHPCI/Plugin/Codeception.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/PHPCI/Plugin/Codeception.php b/PHPCI/Plugin/Codeception.php index b906fb70..6d020210 100644 --- a/PHPCI/Plugin/Codeception.php +++ b/PHPCI/Plugin/Codeception.php @@ -130,6 +130,7 @@ class Codeception implements \PHPCI\Plugin, \PHPCI\ZeroConfigPlugin } $cmd = 'cd "%s" && ' . $codecept . ' run -c "%s" --xml ' . $this->args; + if (IS_WIN) { $cmd = 'cd /d "%s" && ' . $codecept . ' run -c "%s" --xml ' . $this->args; } @@ -137,14 +138,12 @@ class Codeception implements \PHPCI\Plugin, \PHPCI\ZeroConfigPlugin $configPath = $this->phpci->buildPath . $configPath; $success = $this->phpci->executeCommand($cmd, $this->phpci->buildPath, $configPath); + $this->phpci->log( + 'Codeception XML path: '. $this->phpci->buildPath . $this->path . 'report.xml', + Loglevel::DEBUG + ); - $this->phpci->log( - 'Codeception XML path: '. $this->phpci->buildPath . $this->path . 'report.xml', - Loglevel::DEBUG - ); - $xml = file_get_contents($this->phpci->buildPath . $this->path . 'report.xml', false); - - + $xml = file_get_contents($this->phpci->buildPath . $this->path . 'report.xml', false); $parser = new Parser($this->phpci, $xml); $output = $parser->parse(); @@ -157,7 +156,6 @@ class Codeception implements \PHPCI\Plugin, \PHPCI\ZeroConfigPlugin $this->build->storeMeta('codeception-meta', $meta); $this->build->storeMeta('codeception-data', $output); $this->build->storeMeta('codeception-errors', $parser->getTotalFailures()); - $this->phpci->logExecOutput(true); return $success;