Source
if (file_put_contents(PHPUNIT_CONFIG_DIR.'/'.$component.'_usrprm.conf', 'UserParameter='.self::ITEM_NAME_02.',echo multipleParams.02') === false) {
<?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';
/**
* Test suite for user parameters reload
*
* @required-components server, agent, agent2
* @configurationDataProvider configurationProvider
* @backup items, history_str, hosts
* @hosts agentd, agent2
*/
class testUserParametersReload extends CIntegrationTest {
const ITEM_NAME_01 = 'usrprm01';
const ITEM_NAME_02 = 'usrprm02';
private static $hostids = [];
private static $itemids = [];
// List of items to check.
private static $items = [
[
'key' => self::ITEM_NAME_01,
'component' => self::COMPONENT_AGENT
],
[
'key' => self::ITEM_NAME_02,
'component' => self::COMPONENT_AGENT
],
[
'key' => self::ITEM_NAME_01,
'component' => self::COMPONENT_AGENT2
],
[
'key' => self::ITEM_NAME_02,
'component' => self::COMPONENT_AGENT2
]
];
/**
* @inheritdoc
*/
public function prepareData() {