Source
$this->assertEquals('sysmap.php?sysmapid='.$id, $row->getColumn('Actions')->query('link:Constructor')->one()
<?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/CWebTest.php';
require_once dirname(__FILE__).'/../behaviors/CMessageBehavior.php';
require_once dirname(__FILE__).'/../behaviors/CTableBehavior.php';
/**
* @backup sysmaps
*
* @onBefore prepareMapsData
*
*/
class testPageMaps extends CWebTest {
/**
* Attach MessageBehavior and TableBehavior to the test.
*
* @return array
*/
public function getBehaviors() {
return [
CMessageBehavior::class,
CTableBehavior::class
];
}
const SYSMAPS_SQL = 'SELECT * FROM sysmaps ORDER BY sysmapid';
const SYSMAP_NAME_LOW_NUMBER = '999 for sorting test';
const SYSMAP_NAME_HIGH_NUMBER = '1111 for sorting test';
const SYSMAP_NAME_WITH_SYMBOLS = 'Name with 3/4-byte symbols: 🤖 ⃠ Ω⌚Ԏ﨧';
const SYSMAP_TO_DELETE = 'Sysmap for deletion';
const SYSMAP_FIRST_A = 'A map to check alphabetical sorting';
const SYSMAP_FIRST_Z = 'Zabbix sysmap for checking alphabetical sorting';
const SYSMAP_LOW_WIDTH = 'Map with lowest width';
const SYSMAP_HIGH_WIDTH = 'Map with highest width';
const SYSMAP_LOW_HEIGHT = 'Map with lowest height';
const SYSMAP_HIGH_HEIGHT = 'Map with highest height';
const SYSMAP_SPACES_NAME = 'Map to check that there is no trim for spaces';
protected static $sysmapids;
public function prepareMapsData() {
CDataHelper::call('map.create', [
[
'name' => self::SYSMAP_NAME_LOW_NUMBER,