Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrejs Verza <andrejs.verza@zabbix.com>2021-02-25 11:42:34 +0300
committerAndrejs Verza <andrejs.verza@zabbix.com>2021-02-25 11:42:34 +0300
commita39646068e8049c5bab835545eede15cb0618b2d (patch)
treef58f2c5c049514c87cd7525f1b334ffa57c6b986
parentb3a84cffd17e1bdf64b71c6bc6b842d407e24f03 (diff)
A......... [ZBXNEXT-6309] implemented tests for length option for API_OBJECTS validation rule
-rw-r--r--ui/tests/unit/include/classes/validators/CApiInputValidatorTest.php12
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' => []],
'/',