Skip to content

Commit

Permalink
Reorder methods
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Sep 8, 2024
1 parent 857d2a9 commit fdb4ffb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/testing/src/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ protected static function mockRender(): void
Render::swap(new RenderData());
}

protected static function mockCurrentRouteKey(?string $routeKey = null): void
{
Render::swap(new RenderData());
Render::shouldReceive('getRouteKey')->andReturn($routeKey);
}

protected static function mockConfig(array $items = []): void
{
app()->bind('config', fn (): Repository => new Repository($items));

Config::swap(app('config'));
}

protected static function mockCurrentRouteKey(?string $routeKey = null): void
{
Render::swap(new RenderData());
Render::shouldReceive('getRouteKey')->andReturn($routeKey);
}
}

0 comments on commit fdb4ffb

Please sign in to comment.