Source
$response = $this->callUntilDataIsPresent('host.get', ['filter' => ['host' => self::HOST_NAME]], 10, 1);
<?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/CIntegrationTest.php';
require_once dirname(__FILE__).'/../include/helpers/CDataHelper.php';
/**
* Test suite for graph linking.
*
* @required-components server
* @configurationDataProvider serverConfigurationProvider
* @hosts test_graph_linking
* @backup history
*/
class testGraphLinking extends CIntegrationTest {
const HOST_NAME = 'test_graph_linking';
const TEMPLATE_NAME_PRE = 'strata_template_name';
const ITEM_NAME_PRE = 'strata_item_name';
const ITEM_KEY_PRE = 'strata_item_key';
const GRAPH_HEIGHT = 33;
const GRAPH_WIDTH = 319;
const GRAPH_NAME_PRE = 'strata_graph_name';
const GRAPH_TYPE = 1;
const GRAPH_PERCENT_LEFT = 1;
const GRAPH_PERCENT_RIGHT = 100;
const GRAPH_SHOW_3D = 1;
const GRAPH_SHOW_LEGEND = 1;
const GRAPH_SHOW_WORK_PERIOD = 1;
const GRAPH_SHOW_TRIGGERS = 1;
const GRAPH_YAXISMAX = 417;
const GRAPH_YAXISMIN = 18;
const GRAPH_YMAX_TYPE = 2;
const GRAPH_YMIN_TYPE = 1;
const GRAPH_ITEM_COLOR = '00AA';
const NUMBER_OF_TEMPLATES = 5;
const NUMBER_OF_GRAPHS_PER_TEMPLATE = 5;
private static $templateids = array();
private static $stringids = array();
private static $colors = array();
public function createTemplates() {
for ($i = 0; $i < self::NUMBER_OF_TEMPLATES; $i++) {