Skip to content

Commit 2b2acee

Browse files
committed
Fixing static tests;
1 parent b480c4d commit 2b2acee

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/internal/Magento/Framework/Filesystem/Io/File.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ public function cd($dir)
440440
*/
441441
public function read($filename, $dest = null)
442442
{
443+
$result = false;
444+
443445
$this->_cwd();
444446
if ($dest === null) {
445447
$result = @file_get_contents($filename);

lib/internal/Magento/Framework/Filesystem/Test/Unit/Io/FileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private function getTmpDir()
2626
*/
2727
public function testReadShouldCopyTheSourceFileToTheGivenFileResource()
2828
{
29-
$content = \mt_rand();
29+
$content = \random_int(0, 1000);
3030
$sourceFileName = "source-file.txt";
3131
$tmpDir = $this->getTmpDir();
3232
\file_put_contents("{$tmpDir}/{$sourceFileName}", $content);

0 commit comments

Comments
 (0)