Skip to content

Commit

Permalink
update adding middleware to the tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tonko Mulder <[email protected]>
  • Loading branch information
Treggats committed Oct 27, 2024
1 parent aa98910 commit 799a06e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Mazedlx\FeaturePolicy\Tests;

use Illuminate\Contracts\Http\Kernel;
use Illuminate\Support\Facades\Route;
use Mazedlx\FeaturePolicy\AddFeaturePolicyHeaders;
use Orchestra\Testbench\TestCase as Orchestra;
Expand All @@ -14,9 +13,8 @@ protected function setUp(): void
{
parent::setUp();

app(Kernel::class)->pushMiddleware(AddFeaturePolicyHeaders::class);

Route::get('test-route', static fn () => 'ok');
Route::middleware(AddFeaturePolicyHeaders::class)
->get('test-route', static fn () => 'ok');
}

protected function getPackageProviders($app)
Expand Down

0 comments on commit 799a06e

Please sign in to comment.