Commit 13927573 authored by Daniel Hürtgen's avatar Daniel Hürtgen

TASK: Optimize recognizing last test pass status

parent c16e8bfe
Pipeline #397 failed with stages
in 8 minutes and 57 seconds
......@@ -55,13 +55,21 @@ class ComposerTestCase extends TestCase
{
parent::tearDown();
chdir($this->oldWorkingDirectory);
if ($this->testWorkingDir && !$this->hasFailed()) {
if ($this->testWorkingDir && $this->hasPassed()) {
$fs = new Filesystem();
$fs->remove($this->testWorkingDir);
}
unset($this->oldWorkingDirectory, $this->testWorkingDir);
}
/**
* @return bool
*/
protected function hasPassed()
{
return $this->getStatus() === \PHPUnit_Runner_BaseTestRunner::STATUS_PASSED;
}
/**
* @return string
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment