Source
'expected_error' => 'Invalid parameter "/1/lang": value must be one of "default", "en_GB", "en_US", "bg_BG", "ca_ES", "zh_CN", "zh_TW", "cs_CZ", "nl_NL", "fi_FI", "fr_FR", "ka_GE", "de_DE", "el_GR", "he_IL", "hu_HU", "id_ID", "it_IT", "ko_KR", "ja_JP", "lv_LV", "lt_LT", "nb_NO", "fa_IR", "pl_PL", "pt_BR", "pt_PT", "ro_RO", "ru_RU", "sk_SK", "es_ES", "sv_SE", "tr_TR", "uk_UA", "vi_VN".'
<?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/CAPITest.php';
/**
* @onBefore prepareUsersData
*
* @backup users
*/
class testUsers extends CAPITest {
private static $data = [
'userids' => [
'user_with_not_authorized_session' => null,
'user_with_expired_session' => null,
'user_with_passive_session' => null,
'user_with_disabled_usergroup' => null,
'user_for_token_tests' => null,
'user_with_valid_session' => null,
'user_for_extend_parameter_tests' => null
],
'sessionids' => [
'not_authorized_session' => null,
'expired_session' => null,
'passive_session' => null,
'valid_for_user_with_disabled_usergroup' => null,
'valid' => null,
'for_extend_parameter_tests' => null
],
'tokens' => [
'not_authorized' => null,
'expired' => null,
'disabled' => null,
'valid' => null,
'valid_for_user_with_disabled_usergroup' => null
]
];
/**
* Prepare data for user.checkAuthentication tests.
*/
public function prepareUsersData() {
$usergroup_data = [
[