Skip to content

Commit 1aeb1a1

Browse files
committed
Use facade swap for index fake
1 parent 8a2bae3 commit 1aeb1a1

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/Facades/Index.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@ class Index extends Facade
2828
*/
2929
public static function fake(array $existing = []): FakeIndexManager
3030
{
31-
static::clearResolvedInstance(IndexManagerInterface::class);
32-
33-
static::$app->instance(
34-
IndexManagerInterface::class,
35-
$fake = new FakeIndexManager($existing),
36-
);
31+
static::swap($fake = new FakeIndexManager($existing));
3732

3833
return $fake;
3934
}

0 commit comments

Comments
 (0)