Source
xxxxxxxxxx
'error' => 'Invalid parameter "/1/mappings/2": value (inventory_link, expression)=(1, expression 2 for clone) already exists.'
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
require_once dirname(__FILE__).'/../include/CLegacyWebTest.php';
use Facebook\WebDriver\WebDriverBy;
/**
* @backup icon_map
*/
class testFormAdministrationGeneralIconMapping extends CLegacyWebTest {
public function getCreateValidationData() {
return [
// Create icon mapping with empty name
[
[
'error' => 'Invalid parameter "/1/name": cannot be empty.',
'check_db' => false
]
],
// Create with spaces in name
[
[
'name' => ' ',
'error' => 'Invalid parameter "/1/name": cannot be empty.'
]
],
[
[
'name' => 'Icon mapping one',
'mappings' => [
['expression' => 'Create with existing name']
],
'error' => 'Icon map "Icon mapping one" already exists.',
'check_db' => false
]
],
[
[
'name' => 'Icon mapping create with backslash',
'mappings' => [
['expression' => '\\']
],
'error' => 'Invalid parameter "/1/mappings/1/expression": invalid regular expression.'
]
],
[
[
'name' => 'Create with empty expression',
'error' => 'Invalid parameter "/1/mappings/1/expression": cannot be empty.'
]
],
[
[
'name' => 'Icon mapping add two equals expressions',
'mappings' => [
['expression' => 'first expression'],
['expression' => 'first expression']
],
'error' => 'Invalid parameter "/1/mappings/2": value (inventory_link, expression)=(1, first expression) already exists.'
]
],
[
[
'name' => 'Icon mapping add empty second expressions',
'mappings' => [
['expression' => 'first expression'],
['expression' => '']
],
'error' => 'Invalid parameter "/1/mappings/2/expression": cannot be empty.'
]
],
[