Source
xxxxxxxxxx
'doc_link' => '/en/manual/web_interface/frontend_sections/data_collection/templates/discovery/trigger_prototypes'
<?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/CWebTest.php';
use Facebook\WebDriver\WebDriverKeys;
/**
* @dataSource Proxies, Actions
*
* @backup profiles, module, services, token, connector
*
* @onBefore prepareData
*/
class testDocumentationLinks extends CWebTest {
// LLD and host prototype for case 'Host LLD host prototype edit form'.
protected static $lldid;
protected static $host_prototypeid;
public function prepareData() {
self::$version = substr(ZABBIX_VERSION, 0, 3);
// Create a service.
CDataHelper::call('service.create', [
[
'name' => 'Service_1',
'algorithm' => 1,
'sortorder' => 1
]
]);
// Create an API token.
CDataHelper::call('token.create', [
[
'name' => 'Admin token',
'userid' => 1
]
]);
// Create a Connector.
CDataHelper::call('connector.create', [
[
'name' => 'Default connector',
'url' => '{$URL}'
]
]);
// Create event correlation.
CDataHelper::call('correlation.create', [
[
'name' => 'Event correlation for links check',
'filter' => [
'evaltype' => 0,
'conditions' => [
[
'type' => ZBX_CORR_CONDITION_OLD_EVENT_TAG,
'tag' => 'links tag'
]
]
],
'operations' => [
[
'type' => ZBX_CORR_OPERATION_CLOSE_OLD
]
]
]
]);
CDataHelper::call('maintenance.create', [
[
'name' => 'Maintenance for documentation links test',
'maintenance_type' => MAINTENANCE_TYPE_NODATA,
'active_since' => 1534885200,
'active_till' => 1534971600,
'groups' => [['groupid' => 4]], // Zabbix servers.
'timeperiods' => [[]]
]