Source
'error' => 'Invalid parameter "/1/mappings/2": value (inventory_link, expression)=(1, expression 2 for clone) already exists.'
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
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',