Changed default behavior to run a single PHPUnit config from the directory where the config file is read from, this can be changed via 'run_from: dir/'

This commit is contained in:
Steve Kamerman 2013-05-19 18:52:56 -04:00
parent 789e4b7612
commit de2fbc9672

View file

@ -92,17 +92,19 @@ class PhpUnit implements \PHPCI\Plugin
if (is_array($configPath)) {
return $this->recurseArg($configPath, array($this, "runConfigFile"));
} else {
$curdir = getcwd();
if ($this->runFrom) {
$curdir = getcwd();
chdir($this->phpci->buildPath.'/'.$this->runFrom);
} else {
chdir($this->phpci->buildPath.'/'.dirname($configPath));
}
$cmd = $this->phpunit_cmd . ' %s -c "%s"';
$success = $this->phpci->executeCommand($cmd, $this->args, $this->phpci->buildPath . $configPath);
if ($this->runFrom) {
chdir($curdir);
}
chdir($curdir);
return $success;
}