test: add test for if_exist and array data

This commit is contained in:
kenjis 2024-06-12 10:27:28 +09:00
parent cf0e87d56e
commit 33477f8d4e
No known key found for this signature in database
GPG Key ID: BD254878922AF198

View File

@ -100,6 +100,12 @@ class RulesTest extends CIUnitTestCase
['foo' => ''],
false,
],
// Invalid array input
[
['foo' => 'if_exist|alpha'],
['foo' => ['bar' => '12345']],
false,
],
// Input data does not exist then the other rules will be ignored
[
['foo' => 'if_exist|required'],