Source
xxxxxxxxxx
'ssl_key_password' => 'Phasellus imperdiet sapien sed justo elementum, quis maximus ipsum iaculis! Proin egestas, felis non efficitur molestie, nulla risus facilisis nisi, sed consectetur lorem mauris non arcu. Aliquam hendrerit massa vel metus maximus consequat. Sed condimen256'
<?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 httptest
*/
class testWebScenario extends CAPITest {
public static function httptest_create() {
return [
[
'httptest' => [
'name' => 'Api web scenario',
'hostid' => '50009',
'httptestid' => '1'
],
'expected_error' => 'Invalid parameter "/1": unexpected parameter "httptestid".'
],
// Check web name.
[
'httptest' => [
'hostid' => '50009'
],
'expected_error' => 'Invalid parameter "/1": the parameter "name" is missing.'
],
[
'httptest' => [
'name' => '',
'hostid' => '50009'
],
'expected_error' => 'Invalid parameter "/1/name": cannot be empty.'
],
// Check for duplicated web scenarios names.
[
'httptest' => [
'name' => 'Api web scenario',
'hostid' => '50009',
'steps' => [
[
'name' => 'Homepage',
'url' => 'http://zabbix.com',
'no' => 0
]
]
],
'expected_error' => 'Web scenario "Api web scenario" already exists.'
],
[
'httptest' => [
[
'name' => 'One web scenario with existing name',
'hostid' => '50009',
'steps' => [
[
'name' => 'Homepage',
'url' => 'http://zabbix.com',
'no' => 0
]
]
],
[
'name' => 'Api web scenario',
'hostid' => '50009',
'steps' => [
[
'name' => 'Homepage',
'url' => 'http://zabbix.com',
'no' => 0
]
]
]
],
'expected_error' => 'Web scenario "Api web scenario" already exists.'
],
[
'httptest' => [