Skip to content

Commit 508a339

Browse files
Update Filesystem.php
1 parent 872454a commit 508a339

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Filesystem.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,16 @@ public function tempnam(string $dir, string $prefix, string $suffix = ''): strin
632632
* Atomically dumps content into a file.
633633
*
634634
* @param string|resource $content The data to write into the file
635+
* @param bool $ignoreOnTest If phpunit should create a file or not.
635636
*
636637
* @throws IOException if the file cannot be written to
637638
*/
638-
public function dumpFile(string $filename, $content): void
639+
public function dumpFile(string $filename, $content, bool $ignoreOnTest = false): void
639640
{
641+
if ($ignoreOnTest) {
642+
return;
643+
}
644+
640645
if (\is_array($content)) {
641646
throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__));
642647
}

0 commit comments

Comments
 (0)