jeudi 4 février 2016

test check user logged in laravel

I have a simple route to function

if (Auth::check()) { return response() ->json('true'); }else{ return response() ->json('false'); }

I need to test this function, with something like this from phpUNIT

  $this->get('auth/checkLoggedIn')
         ->seeJson([true]);

How do I simulate that the test user is loggedIn?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1TGU5MS
via IFTTT

Aucun commentaire:

Enregistrer un commentaire