From 641826a5a408b00a6adb04847d178925bbe0e574 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Mon, 25 Sep 2023 20:46:58 +0300 Subject: Improve API --- tests/HirdTest.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/HirdTest.php b/tests/HirdTest.php index 35f4895..8083562 100644 --- a/tests/HirdTest.php +++ b/tests/HirdTest.php @@ -94,12 +94,8 @@ test('Validate using a overwritten field name', function () { $fieldNames = ['date' => 'Date']; $rules = ['date' => 'date-format:Y-m-d H:i:s']; - $hird = new Hird( - fields: $fields, - rules: $rules, - fieldNames: $fieldNames - ); - + $hird = new Hird($fields, $rules); + $hird->setFieldNames($fieldNames); $hird->fails(); expect($hird->errors())->toBe([ -- cgit v1.2.3