diff --git a/tests/Feature/RuleTest.php b/tests/Feature/RuleTest.php index 5f93948..05a4a20 100644 --- a/tests/Feature/RuleTest.php +++ b/tests/Feature/RuleTest.php @@ -367,12 +367,12 @@ it('validates not_required_with rule successfully', function () { - $validator = new Validator(['field' => 'value', 'other_field' => 'value2'], ['field' => 'not_required_with:other_field']); - expect($validator->isValid())->toBeFalse(); - $validator = new Validator(['field' => 'value'], ['field' => 'not_required_with:other_field']); expect($validator->isValid())->toBeTrue(); + $validator = new Validator(['field' => 'value', 'other_field' => 'value2'], ['field' => 'not_required_with:other_field']); + expect($validator->isValid())->toBeFalse(); + expect($validator->getErrors()['field'][0])->toBe( LangManager::getTranslation('validation.not_required_with', [ 'attribute' => 'field',