Skip to content
Snippets Groups Projects
Commit 13927573 authored by Daniel Hürtgen's avatar Daniel Hürtgen
Browse files

TASK: Optimize recognizing last test pass status

parent c16e8bfe
1 merge request!45WIP: Resolve "Composer plugin is not always triggered"
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
*/
......
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