Skip to content

Commit

Permalink
Dev: Include datestamp in test screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Nov 22, 2017
1 parent 47d59ff commit d6aa20f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/TestHelper.php
Expand Up @@ -301,7 +301,7 @@ public function takeScreenshot($webDriver, $name)
$tempFolder = \Yii::app()->getBasePath() .'/../tests/tmp';
$folder = $tempFolder.'/screenshots/';
$screenshot = $webDriver->takeScreenshot();
$filename = $folder . $name . '.png';
$filename = $folder . $name . date('YmdHis') . '.png';
$result = file_put_contents($filename, $screenshot);
$this->assertTrue($result > 0, 'Could not write screenshot to file ' . $filename);
}
Expand Down

0 comments on commit d6aa20f

Please sign in to comment.