Laravel 5 testing routes -


i want test named routes redirect url supposed to. example:

get('users/profile', ['uses' => 'usercontroller@profile', 'as' => 'users.profile']); 

how can assert users.profile indeed redirecting users/profile , called method indeed usercontroller#profile() ?

if i'm not mistaken, use request class , call request::is('users/profile') if use facade in unit test. otherwise, either instantiate request class or call facade directly.

not sure you're looking for, that's best shot.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -