fixing the phpunit plugin
This commit is contained in:
parent
b1b048a0b7
commit
7e4c8313dc
10
PHPCI/Plugin/PhpUnit.php
Executable file → Normal file
10
PHPCI/Plugin/PhpUnit.php
Executable file → Normal file
|
@ -124,7 +124,7 @@ class PhpUnit implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
||||||
|
|
||||||
// Run any config files first. This can be either a single value or an array.
|
// Run any config files first. This can be either a single value or an array.
|
||||||
if ($this->xmlConfigFile !== null) {
|
if ($this->xmlConfigFile !== null) {
|
||||||
$success &= $this->runConfigFile();
|
$success &= $this->runConfigFile($this->xmlConfigFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run any dirs next. Again this can be either a single value or an array.
|
// Run any dirs next. Again this can be either a single value or an array.
|
||||||
|
@ -152,10 +152,10 @@ class PhpUnit implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function runConfigFile()
|
protected function runConfigFile($configPath)
|
||||||
{
|
{
|
||||||
if (is_array($this->xmlConfigFile)) {
|
if (is_array($configPath)) {
|
||||||
return $this->recurseArg($this->xmlConfigFile, array($this, "runConfigFile"));
|
return $this->recurseArg($configPath, array($this, "runConfigFile"));
|
||||||
} else {
|
} else {
|
||||||
if ($this->runFrom) {
|
if ($this->runFrom) {
|
||||||
$curdir = getcwd();
|
$curdir = getcwd();
|
||||||
|
@ -172,7 +172,7 @@ class PhpUnit implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
||||||
|
|
||||||
|
|
||||||
$cmd = $phpunit . ' --tap %s -c "%s" ' . $this->coverage . $this->path;
|
$cmd = $phpunit . ' --tap %s -c "%s" ' . $this->coverage . $this->path;
|
||||||
$success = $this->phpci->executeCommand($cmd, $this->args, $this->phpci->buildPath . $this->xmlConfigFile);
|
$success = $this->phpci->executeCommand($cmd, $this->args, $this->phpci->buildPath . $configPath);
|
||||||
|
|
||||||
if ($this->runFrom) {
|
if ($this->runFrom) {
|
||||||
chdir($curdir);
|
chdir($curdir);
|
||||||
|
|
Loading…
Reference in a new issue