Skip to content

Commit

Permalink
Add visitRoute() to Illuminate\Foundation\Testing\Concerns\InteractsW…
Browse files Browse the repository at this point in the history
…ithPages. (laravel#14630)
  • Loading branch information
simonhunt authored and tillkruss committed Aug 30, 2016
1 parent b466251 commit e4dc612
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Illuminate/Foundation/Testing/Concerns/InteractsWithPages.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ public function visit($uri)
return $this->makeRequest('GET', $uri);
}

/**
* Visit the given named route with a GET request.
*
* @param string $route
* @param array $parameters
* @return $this
*/
public function visitRoute($route, $parameters = [])
{
return $this->makeRequest('GET', route($route, $parameters));
}

/**
* Make a request to the application and create a Crawler instance.
*
Expand Down

0 comments on commit e4dc612

Please sign in to comment.