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 26, 2024
1 parent 4d81967 commit e3405bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 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,7 +13,9 @@ protected function setUp(): void
{
parent::setUp();

app(Kernel::class)->pushMiddleware(AddFeaturePolicyHeaders::class);
$this->withMiddleware([
AddFeaturePolicyHeaders::class,
]);

Route::get('test-route', static fn () => 'ok');
}
Expand Down

0 comments on commit e3405bb

Please sign in to comment.