Created
August 7, 2016 03:43
-
-
Save mercuryseries/2d11a77a14a20d0ee51fddd7a6a8713f to your computer and use it in GitHub Desktop.
Some test method helpers for the Laravel Framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
trait MakeHttpRequests | |
{ | |
/** | |
* Visit the given route with a GET request. | |
* | |
* @param string $uri | |
* @param array $headers | |
* @return $this | |
*/ | |
public function visitRoute($route_name) | |
{ | |
return $this->visit(route($route_name)); | |
} | |
/** | |
* Visit the given route with a GET request. | |
* | |
* @param string $uri | |
* @param array $headers | |
* @return $this | |
*/ | |
public function getRoute($route_name) | |
{ | |
return $this->get(route($route_name)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment