array_merge() does not accept unknown named parameters composr code example
Example: array_merge() does not accept unknown named parameters laravel
public function test_fields_are_required()
{
collect(value: ['name','org_number','company','SSN','ZIP_Code','residence','description'])
->each(callback: function($field){
$response = $this->post('/api/customer',
array_merge( $this->data(), [$field => '']));
$response->assertSessionHasErrors($field);
$this->assertCount(expectedCount: 0, haystack: Customer::all());
});
}