diff options
author | Andrejs Verza <andrejs.verza@zabbix.com> | 2021-02-25 11:42:34 +0300 |
---|---|---|
committer | Andrejs Verza <andrejs.verza@zabbix.com> | 2021-02-25 11:42:34 +0300 |
commit | a39646068e8049c5bab835545eede15cb0618b2d (patch) | |
tree | f58f2c5c049514c87cd7525f1b334ffa57c6b986 | |
parent | b3a84cffd17e1bdf64b71c6bc6b842d407e24f03 (diff) |
A......... [ZBXNEXT-6309] implemented tests for length option for API_OBJECTS validation rule
-rw-r--r-- | ui/tests/unit/include/classes/validators/CApiInputValidatorTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/tests/unit/include/classes/validators/CApiInputValidatorTest.php b/ui/tests/unit/include/classes/validators/CApiInputValidatorTest.php index 678b0bc89cc..aa5cd23221e 100644 --- a/ui/tests/unit/include/classes/validators/CApiInputValidatorTest.php +++ b/ui/tests/unit/include/classes/validators/CApiInputValidatorTest.php @@ -1345,6 +1345,18 @@ class CApiInputValidatorTest extends PHPUnit_Framework_TestCase { 'Invalid parameter "/": cannot be empty.' ], [ + ['type' => API_OBJECTS, 'length' => 2, 'fields' => []], + [[], [], []], + '/', + 'Invalid parameter "/": value is too long.' + ], + [ + ['type' => API_OBJECTS, 'length' => 3, 'fields' => []], + [[], [], []], + '/', + [[], [], []] + ], + [ ['type' => API_OBJECTS, 'fields' => []], ['000' => []], '/', |