diff --git a/PHPCI/Builder.php b/PHPCI/Builder.php index 9b88e597..b7b8c77e 100644 --- a/PHPCI/Builder.php +++ b/PHPCI/Builder.php @@ -121,7 +121,7 @@ class Builder implements LoggerAwareInterface $pluginFactory = $this->buildPluginFactory($build); $pluginFactory->addConfigFromFile(PHPCI_DIR . "/pluginconfig.php"); - $this->pluginExecutor = new Plugin\Util\Executor($pluginFactory, $this); + $this->pluginExecutor = new Plugin\Util\Executor($pluginFactory, $this->buildLogger); $this->commandExecutor = new CommandExecutor( $this->buildLogger, diff --git a/PHPCI/Controller/WebhookController.php b/PHPCI/Controller/WebhookController.php index 1b118440..9a9d143b 100644 --- a/PHPCI/Controller/WebhookController.php +++ b/PHPCI/Controller/WebhookController.php @@ -97,7 +97,7 @@ class WebhookController extends \PHPCI\Controller } try { - $this->_buildStore->save($build); + $this->buildStore->save($build); /** bugfix: Errors with PHPCI GitHub hook #296 */ } catch (\Exception $ex) { header('HTTP/1.1 500 Internal Server Error'); header('Ex: ' . $ex->getMessage()); diff --git a/PHPCI/Plugin/Codeception.php b/PHPCI/Plugin/Codeception.php index 802d3540..bac0e7be 100644 --- a/PHPCI/Plugin/Codeception.php +++ b/PHPCI/Plugin/Codeception.php @@ -20,7 +20,14 @@ use PHPCI\Model\Build; */ class Codeception implements \PHPCI\Plugin { - protected $args; + /** + * @var string + */ + protected $args = ''; + + /** + * @var Builder + */ protected $phpci; /** @@ -30,14 +37,13 @@ class Codeception implements \PHPCI\Plugin public function __construct(Builder $phpci, Build $build, array $options = array()) { - $this->phpci = $phpci; + $this->phpci = $phpci; if (isset($options['config'])) { $this->xmlConfigFile = $options['config']; } - if (isset($options['args'])) { - $this->args = $options['args']; + $this->args = (string) $options['args']; } } @@ -69,9 +75,9 @@ class Codeception implements \PHPCI\Plugin return false; } - $cmd = 'cd "%s" && ' . $codecept . ' run -c "%s"'; + $cmd = 'cd "%s" && ' . $codecept . ' run -c "%s" '. $this->args; if (IS_WIN) { - $cmd = 'cd /d "%s" && ' . $codecept . ' run -c "%s"'; + $cmd = 'cd /d "%s" && ' . $codecept . ' run -c "%s" '. $this->args; } $success = $this->phpci->executeCommand($cmd, $this->phpci->buildPath, $this->phpci->buildPath . $configPath); diff --git a/PHPCI/View/Build/view.phtml b/PHPCI/View/Build/view.phtml index 6e181444..0c6817c9 100644 --- a/PHPCI/View/Build/view.phtml +++ b/PHPCI/View/Build/view.phtml @@ -19,7 +19,7 @@ @@ -44,5 +44,13 @@ foreach ($plugins as $plugin) {