I'm setting up tests to start adding recording activity in my app (like I the Birdboard course). I have this function:
function creating_a_client_generates_activity()
{
$client = factory('App\Client')->create();
$this->assertCount(1, $client->activity);
}
But when I run it I get:
Tests\Feature\ActivityFeedTest::creating_a_client_generates_activity
TypeError: Argument 1 passed to Illuminate\Database\Eloquent\Builder::create() must be of the type array, object given,
I'm assuming it is the way I have tried to create the client but I don't know how to fix it.