Source
xxxxxxxxxx
<?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/CAPITest.php';
/**
* @backup sysmaps
*/
class testMap extends CAPITest {
/**
* Create map tests data provider.
*
* @return array
*/
public static function createMapDataProvider() {
return [
// Success. Map A1, map B1 with submap having sysmapid=1 created. Map with sysmapid=1 should exist.
[
'request_data' => [
[
'name' => 'A1',
'width' => '800',
'height' => '600',
'backgroundid' => '0',
'label_type' => '0',
'label_location' => '0',
'highlight' => '0',
'expandproblem' => '1',
'markelements' => '0',
'show_unack' => '0',
'grid_size' => '50',
'grid_show' => '1',
'grid_align' => '1',
'label_format' => '0',
'label_type_host' => '2',
'label_type_hostgroup' => '2',
'label_type_trigger' => '2',
'label_type_map' => '2',
'label_type_image' => '2',
'label_string_host' => '',
'label_string_hostgroup' => '',
'label_string_trigger' => '',
'label_string_map' => '',
'label_string_image' => '',
'iconmapid' => '0',
'expand_macros' => '0',
'severity_min' => '0',
'show_suppressed' => '0',
'userid' => '1',
'private' => '1',
'selements' => []
],
[
'name' => 'B1',
'width' => '800',
'height' => '600',
'backgroundid' => '0',
'label_type' => '0',
'label_location' => '0',
'highlight' => '0',
'expandproblem' => '1',
'markelements' => '0',
'show_unack' => '0',
'grid_size' => '50',
'grid_show' => '1',
'grid_align' => '1',
'label_format' => '0',
'label_type_host' => '2',
'label_type_hostgroup' => '2',
'label_type_trigger' => '2',
'label_type_map' => '2',
'label_type_image' => '2',
'label_string_host' => '',
'label_string_hostgroup' => '',
'label_string_trigger' => '',
'label_string_map' => '',
'label_string_image' => '',
'iconmapid' => '0',