Source
zbx_dbstr(self::DISCOVERED_GROUPID2).", ".$group_prototypeid.", ".zbx_dbstr(self::DISCOVERED_GROUP2).", '1672831234', '1677670843')"
<?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.
**/
class DiscoveredHosts {
const DISCOVERED_HOST = 'Discovered host from prototype 1';
const DISCOVERED_HOST2 = 'Discovered host from prototype 11';
const DISCOVERED_HOSTID = 90000079;
const DISCOVERED_HOSTID2 = 90000080;
const DISCOVERED_INTERFACEID = 90000080;
const DISCOVERED_HOST_GROUPID = 90000081;
const DISCOVERED_HOST_GROUPID2 = 90000082;
const DISCOVERED_GROUP = 'Group created from host prototype 1';
const DISCOVERED_GROUP2 = 'Group created from host prototype 11';
const DISCOVERED_GROUPID = 90000079;
const DISCOVERED_GROUPID2 = 90000080;
const DISCOVERED_HOST_GROUP_PROTOTYPEID = 90000083;
const DISCOVERED_HOST_GROUP_PROTOTYPEID2 = 90000084;
const DISCOVERED_HOSTTEMPLATEID = 90000079;
const DISCOVERED_HOSTTEMPLATEID2 = 90000080;
/**
* Parent hostid.
*
* @var integer
*/
protected static $hostid;
/**
* Create data for testFormHost, testPageHostGroups, testFormGroups, Discovered host scenario.
*
* @return array
*/
public static function load() {
// Create hostgroup for discovered host test.
$hostgroups = CDataHelper::call('hostgroup.create', [
[
'name' => 'Group for discovered host test'
]
]);
$hostgroupid = $hostgroups['groupids'][0];
$hosts = CDataHelper::call('host.create', [
'host' => 'Test of discovered host',
'groups' => [