Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Oct 27, 2020
1 parent dad177a commit 25a1d76
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Routing/RouteRegistrarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ public function testCanRegisterRouteWithControllerAction()
$this->seeMiddleware('controller-middleware');
}

public function testCanRegisterRouteWithControllerActionArray()
{
$this->router->middleware('controller-middleware')
->get('users', [RouteRegistrarControllerStub::class, 'index']);

$this->seeResponse('controller', Request::create('users', 'GET'));
$this->seeMiddleware('controller-middleware');
}

public function testCanRegisterRouteWithArrayAndControllerAction()
{
$this->router->middleware('controller-middleware')->put('users', [
Expand Down

0 comments on commit 25a1d76

Please sign in to comment.