Source
if (($db_map['grid_align'] == SYSMAP_GRID_ALIGN_ON && $autoAlign == 0) || ($db_map['grid_align'] == SYSMAP_GRID_ALIGN_OFF && $autoAlign == 1)) {
<?php
/*
** Zabbix
** Copyright (C) 2001-2023 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/CLegacyWebTest.php';
class testFormMap extends CLegacyWebTest {
/**
* Possible combinations of grid settings
* @return array
*/
public function possibleGridOptions() {
return [
// grid size, show grid, auto align
['20x20', 1, 1],
['40x40', 1, 1],
['50x50', 1, 1],
['75x75', 1, 1],
['100x100', 1, 1],
['20x20', 1, 0],
['40x40', 1, 0],
['50x50', 1, 0],
['75x75', 1, 0],
['100x100', 1, 0],
['20x20', 0, 1],
['40x40', 0, 1],
['50x50', 0, 1],
['75x75', 0, 1],
['100x100', 0, 1],
['20x20', 0, 0],
['40x40', 0, 0],
['50x50', 0, 0],
['75x75', 0, 0],
['100x100', 0, 0]
];
}
/**
* Test setting of grid options for map
*
* @dataProvider possibleGridOptions
*/
public function testFormMap_UpdateGridOptions($gridSize, $showGrid, $autoAlign) {