Skip to content

Commit

Permalink
additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
arukompas committed Feb 14, 2024
1 parent 0c053ea commit 3d2936f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/Feature/Authorization/CanViewLogViewerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@
get(route('log-viewer.index'))->assertOk();
});

test('can fake environment to production', function () {
test('local environment can use Log Viewer by default', function () {
app()->detectEnvironment(fn () => 'local');
expect(app()->isProduction())->toBeFalse();
(new \Opcodes\LogViewer\LogViewerServiceProvider(app()))->boot();

get(route('log-viewer.index'))->assertOk();
});

test('Log Viewer is blocked in production environment by default', function () {
app()->detectEnvironment(fn () => 'production');
expect(app()->isProduction())->toBeTrue();
(new \Opcodes\LogViewer\LogViewerServiceProvider(app()))->boot();
Expand Down

0 comments on commit 3d2936f

Please sign in to comment.