Last active
May 6, 2018 21:42
-
-
Save JuanVqz/f65fd3da98741b5e2a0bc50342f8c42b to your computer and use it in GitHub Desktop.
TestCase.php with signIn method 2
This file contains hidden or 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 | |
namespace Tests; | |
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
abstract class TestCase extends BaseTestCase | |
{ | |
use CreatesApplication; | |
protected function signIn($user = null) { | |
$user = $user ?: create('App\User'); | |
$this->actingAs('$user'); | |
return $this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment