phpci/PHPCI/Plugin/PhpSpec.php
2013-05-14 14:37:14 +01:00

23 lines
435 B
PHP

<?php
namespace PHPCI\Plugin;
class PhpSpec implements \PHPCI\Plugin
{
protected $phpci;
public function __construct(\PHPCI\Builder $phpci, array $options = array())
{
$this->phpci = $phpci;
}
public function execute()
{
$cwd = getcwd();
$command = 'cd ' . $this->phpci->buildPath . ' && ';
$command .= PHPCI_BIN_DIR . 'phpspec';
$command .= ' && cd ' . $cwd;
return $this->phpci->executeCommand($command);
}
}