diff --git a/src/Tests/PersistUnit/ModelTest.php b/src/Tests/PersistUnit/ModelTest.php index dc154e2..1cf7ba4 100644 --- a/src/Tests/PersistUnit/ModelTest.php +++ b/src/Tests/PersistUnit/ModelTest.php @@ -184,7 +184,9 @@ public function tearDown(){ // display error log if any $errorlogFile = self::$errorLogDir.'/'. md5($this->getName()); if(file_exists($errorlogFile)){ - echo PHP_EOL.file_get_contents($errorlogFile).PHP_EOL; + if($this->hasFailed()){ + echo PHP_EOL.file_get_contents($errorlogFile).PHP_EOL; + } unlink($errorlogFile); } }