ollieread / multiauth

Laravel multi auth
441 stars 109 forks source link

Documentation for setting the current user in test #28

Closed tylerjohnst closed 10 years ago

tylerjohnst commented 10 years ago

Ran in to this problem while moving from the built in authentication to multiauth.

The implementation in the Foundation TestCase is here: https://github.com/laravel/framework/blob/master/src/Illuminate/Foundation/Testing/TestCase.php#L404

Backwards compatibility could be hacked in by adding a #driver() function on MultiManager.php to handle searching by key, but that seems like a bit of a hack just to make testing a bit nicer but I'm open to suggestions. For now I can add some documentation to get people pointed in the right direction.