Skip to content

Commit

Permalink
make screenshot filenames sort by time
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Jun 20, 2024
1 parent 9c2009b commit 5456397
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private function takeScreenshot() {
mkdir(self::SCREENSHOTS_PATH);
}
if (is_dir(self::SCREENSHOTS_PATH)) {
$path = self::SCREENSHOTS_PATH . date('d-m-y') . '-' . uniqid() . '.png';
$path = self::SCREENSHOTS_PATH . date('Y-m-d_H:i:s_') . uniqid() . '.png';
file_put_contents($path, $screenshot);
print "\n\nScreenshot: " . $path;
}
Expand Down

0 comments on commit 5456397

Please sign in to comment.