Source
$message = $data['action'].' selected connector'.(count(CTestArrayHelper::get($data, 'name', [])) === 1 ? '?' : 's?' );
<?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';
require_once dirname(__FILE__).'/../behaviors/CMessageBehavior.php';
require_once dirname(__FILE__).'/../behaviors/CTableBehavior.php';
/**
* @backup connector, profiles
*
* @onBefore prepareData
*
*/
class testPageConnectors extends CWebTest {
/**
* Attach MessageBehavior and TableBehavior to the test.
*
* @return array
*/
public function getBehaviors() {
return [
CMessageBehavior::class,
CTableBehavior::class
];
}
private static $connectors;
private static $connector_sql = 'SELECT * FROM connector ORDER BY connectorid';
private static $delete_connector = 'Connector для удаления - ⊏∅∩∩∈©⊤∅Ř';
private static $update_connector = 'Update connector';
public static function prepareData() {
$response = CDataHelper::call('connector.create', [
[
'name' => 'Default connector',
'url' => '{$URL}'
],
[
'name' => 'Connector with Advanced configuration',
'url' => 'https://zabbix.com:82/v1/history'
],
[
'name' => 'Item value connector',
'url' => 'http://zabbix.com:82/v1/history',
'data_type' => ZBX_CONNECTOR_DATA_TYPE_ITEM_VALUES
],
[
'name' => 'Events connector',
'url' => 'http://zabbix.com:82/v1/events',