Skip to content

Commit 34c3fc8

Browse files
committed
maintaining same errorlog file throughout the testMethod
1 parent 8f9d106 commit 34c3fc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Tests/PersistUnit/ModelTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function tearDown(){
197197
function clearErrorLog(){
198198
$errorlogFile = self::$errorLogDir.'/'. md5($this->getName());
199199
if(file_exists($errorlogFile)){
200-
unlink($errorlogFile);
200+
file_put_contents($errorlogFile,'');
201201
}
202202
}
203203

@@ -208,7 +208,7 @@ function assertContainsAndClearLog($message){
208208
$log = file_get_contents($errorlogFile);
209209
}
210210
$this->assertContains($message, $log);
211-
unlink($errorlogFile);
211+
file_put_contents($errorlogFile,'');
212212
}
213213

214214
public function getSetUpOperation()

0 commit comments

Comments
 (0)