Skip to content

Commit

Permalink
Assert log file contains valid string
Browse files Browse the repository at this point in the history
  • Loading branch information
ishan-biztech committed Jun 19, 2020
1 parent 335e06f commit f6e2690
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/TestCase/Utility/LogTest.php
Expand Up @@ -39,6 +39,10 @@ public function testLogsStringData() {

$this->assertTrue($result);
$this->assertFileExists(self::CUSTOM_FILE_PATH);
$this->assertRegExp(
'/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Debug: It works!/',
file_get_contents(self::CUSTOM_FILE_PATH)
);

unlink(self::CUSTOM_FILE_PATH);
}
Expand Down

0 comments on commit f6e2690

Please sign in to comment.