Files
monica/tests/FeatureTestCase.php
T
2017-06-13 15:53:20 -04:00

25 lines
448 B
PHP

<?php
namespace Tests;
class FeatureTestCase extends TestCase
{
/**
* Create a user and sign in as that user. If a user
* object is passed, then sign in as that user.
*
* @param null $user
* @return mixed
*/
public function signIn($user = null)
{
if( is_null($user) )
{
$user = factory('App\User')->create();
}
$this->be($user);
return $user;
}
}