-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
While debugging for this issue Codeception/Codeception#4871, I keep getting message Could not write error to log file
.
When I traced the cause, it's from here.
$errorLogFile = defined('C3_CODECOVERAGE_ERROR_LOG_FILE') ? | |
C3_CODECOVERAGE_ERROR_LOG_FILE : | |
C3_CODECOVERAGE_MEDIATE_STORAGE . DIRECTORY_SEPARATOR . 'error.txt'; | |
if (is_writable($errorLogFile)) { | |
file_put_contents($errorLogFile, $message); | |
} else { | |
$message = "Could not write error to log file ($errorLogFile), original message: $message"; | |
} |
Apparently the c3tmp
directory is always emptied by __c3_clear()
when the test is executed.
This cause problem because is_writable
returns true if the file exists and is writable.
Metadata
Metadata
Assignees
Labels
No labels