Files
monica/tests/FeatureTestCase.php
T
Régis Freyd a2172f0851 Add style CI (#503)
Hopefully this will result in slightly better code.
2017-07-26 21:02:55 -04:00

25 lines
440 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;
}
}