Aug 27, 2016
0
Level 7
Writing tests for Spark app
I'm trying to write some simple tests for an app I'm building on top of Spark.
Here's what my simple test looks like:
public function testUserLogin()
{
$user = factory(App\User::class)->make();
$this->actingAs($user)
->visit('/');
}
I'm getting an error coming from the UserRepository of Spark.
Fatal error: Call to a member function shouldHaveSelfVisibility() on a non-object in UserRepository.php on line 20
Does anyone know why?
Is it because the factory doesn't assign an id?
Please or to participate in this conversation.