Skip to content

Commit 2de8280

Browse files
committed
Refactor Storage::fake to accept enum_value for disk handling
1 parent ed0237b commit 2de8280

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Illuminate/Support/Facades/Storage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Illuminate\Support\Facades;
44

55
use Illuminate\Filesystem\Filesystem;
6+
use function Illuminate\Support\enum_value;
67

78
/**
89
* @method static \Illuminate\Contracts\Filesystem\Filesystem drive(string|null $name = null)
@@ -96,7 +97,7 @@ class Storage extends Facade
9697
*/
9798
public static function fake($disk = null, array $config = [])
9899
{
99-
$root = self::getRootPath($disk = $disk ?: static::$app['config']->get('filesystems.default'));
100+
$root = self::getRootPath($disk = enum_value($disk) ?: static::$app['config']->get('filesystems.default'));
100101

101102
if ($token = ParallelTesting::token()) {
102103
$root = "{$root}_test_{$token}";

0 commit comments

Comments
 (0)