$actor, 'company_attempting_to_associate' => $company, 'assertions' => $assertions] = $data(); $this->settings->enableMultipleFullCompanySupport(); $this->actingAs($actor) ->post(route('licenses.store'), [ 'name' => 'My Cool License', 'seats' => '1', 'category_id' => Category::factory()->forLicenses()->create()->id, 'company_id' => $company->id, ]); $license = License::where('name', 'My Cool License')->sole(); $assertions($license); } }