Skip to content

Commit

Permalink
Make the test use the route middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurt Friars committed Mar 6, 2024
1 parent 251750b commit 3e60158
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ protected function getPackageProviders($app)
public function getEnvironmentSetUp($app)
{
$app['config']->set('database.default', 'testing');
$app['router']->get('posts/{id}', [PostController::class, 'show'])->name('posts.show');

$app['router']->middleware('publisher')
->get('posts/{id}', [PostController::class, 'show'])
->name('posts.show');
}
}

0 comments on commit 3e60158

Please sign in to comment.