Skip to content

Commit

Permalink
maintaining same errorlog file throughout the testMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
Raaghu committed Mar 21, 2018
1 parent 8f9d106 commit 34c3fc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tests/PersistUnit/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function tearDown(){
function clearErrorLog(){
$errorlogFile = self::$errorLogDir.'/'. md5($this->getName());
if(file_exists($errorlogFile)){
unlink($errorlogFile);
file_put_contents($errorlogFile,'');
}
}

Expand All @@ -208,7 +208,7 @@ function assertContainsAndClearLog($message){
$log = file_get_contents($errorlogFile);
}
$this->assertContains($message, $log);
unlink($errorlogFile);
file_put_contents($errorlogFile,'');
}

public function getSetUpOperation()
Expand Down

0 comments on commit 34c3fc8

Please sign in to comment.