Source
'error' => 'Group "Group for Correlation" cannot be deleted, because it is used in a correlation condition.'
<?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__).'/../common/testFormGroups.php';
/**
* @backup hosts
*
* @onBefore prepareGroupData
*
* @dataSource DiscoveredHosts, HostTemplateGroups
*/
class testFormHostGroupStandalone extends testFormGroups {
protected $standalone = true;
protected $link = 'zabbix.php?action=hostgroup.edit&groupid=';
protected $object = 'host';
protected static $update_group = 'Group for Update test';
public function testFormHostGroupStandalone_Layout() {
$this->layout('Zabbix servers');
}
public function testFormHostGroupStandalone_DiscoveredLayout() {
$this->layout(self::DISCOVERED_GROUP, self::LLD);
}
public static function getHostValidationData() {
return [
[
[
'expected' => TEST_BAD,
'fields' => [
'Group name' => self::DISCOVERED_GROUP
],
'error' => 'Host group "'.self::DISCOVERED_GROUP.'" already exists.'
]
]
];
}
public static function getHostCreateData() {
return [
[
[
'expected' => TEST_BAD,
'fields' => [
'Group name' => 'Zabbix servers'
],
'error' => 'Host group "Zabbix servers" already exists.'