Source
$db_values = CDBHelper::getAll('SELECT name, value_int FROM settings WHERE name IN ('.$field_names.') ORDER BY name');
<?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/CLegacyWebTest.php';
/**
* @onBefore removeGuestFromDisabledGroup, addDefaultAllowAuthKeyToConfig
*
* @onAfter addGuestToDisabledGroup
*
* @backupConfig
*
* @dataSource LoginUsers
*/
class testUsersAuthenticationHttp extends CLegacyWebTest {
const LOGIN_GUEST = 1;
const LOGIN_USER = 2;
const LOGIN_HTTP = 3;
protected function getFilePath() {
return dirname(__FILE__).'/../../../conf/zabbix.conf.php';
}
/**
* Attach MessageBehavior to the test.
*
* @return array
*/
public function getBehaviors() {
return ['class' => CMessageBehavior::class];
}
public function testUsersAuthenticationHttp_Layout() {
$this->page->login()->open('zabbix.php?action=authentication.edit');
$form = $this->query('id:authentication-form')->asForm()->one();
$form->selectTab('HTTP settings');
// Check default values.
$default_values = [
'Enable HTTP authentication' => false,
'Default login form' => 'Zabbix login form',
'Remove domain name' => '',
'Case-sensitive login' => true
];
$form->checkValue($default_values);
// Check disabled fields.
$fields = ['Default login form', 'Remove domain name', 'Case-sensitive login'];
foreach ($fields as $field) {