$actor, 'company_attempting_to_associate' => $company, 'assertions' => $assertions] = $data(); $this->settings->enableMultipleFullCompanySupport(); $this->actingAs($actor) ->post(route('hardware.store'), [ 'asset_tags' => ['1' => '1234'], 'model_id' => AssetModel::factory()->create()->id, 'status_id' => Statuslabel::factory()->create()->id, 'company_id' => $company->id, ]); $asset = Asset::where('asset_tag', '1234')->sole(); $assertions($asset); } }