Source
<?php
/*
** Zabbix
** 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 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/CIntegrationTest.php';
require_once dirname(__FILE__).'/../include/helpers/CDataHelper.php';
/**
* Test suite for trigger linking.
*
* @required-components server
* @configurationDataProvider serverConfigurationProvider
* @hosts test_trigger_linking
* @backup history
*/
class testTriggerLinking extends CIntegrationTest {
const HOST_NAME = 'test_trigger_linking';
const TEMPLATE_NAME_PRE = 'strata_template_name';
const ITEM_NAME_PRE = 'strata_item_name';
const ITEM_KEY_PRE = 'strata_item_key';
const TAG_NAME_PRE = 'strata_tag';
const TAG_VALUE_PRE = 'strata_value';
const TRIGGER_DESCRIPTION_PRE = 'strata_trigger_description';
const TRIGGER_DESCRIPTION_SAME_ALL = 'zstrata_same_description_on_all_templates';
const TRIGGER_PRIORITY = 4;
const TRIGGER_STATUS = 1;
const TRIGGER_COMMENTS_PRE = 'strata_comment';
const TRIGGER_URL_PRE = 'strata_url';
const TRIGGER_TYPE = 1;
const TRIGGER_RECOVERY_MODE = 1;
const TRIGGER_CORRELATION_MODE = 1;
const TRIGGER_CORRELATION_TAG_PRE = 'strata_correlation_tag';
const TRIGGER_CORRELATION_TAG_FOR_NEW_TEMPLATE = 'Xtag';
const TRIGGER_MANUAL_CLOSE = 1;
const TRIGGER_OPDATA_PRE = 'strata_opdata';
const TRIGGER_EVENT_NAME_PRE = 'strata_event_name';
const NUMBER_OF_TEMPLATES = 10;
const NUMBER_OF_TRIGGERS_PER_TEMPLATE = 20;
private static $templateids = array();
private static $stringids = array();
/* Template X will be linked after the initial set of templates get linked and then unliked (without clear). */