Source
$this->test->assertEquals(count($data), count($steps), 'Preprocessing step count should match step count in data.');
<?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/CBehavior.php';
/**
* Behavior for preprocessing related tests.
*/
class CPreprocessingBehavior extends CBehavior {
/**
* Get descriptors of preprocessing fields.
*
* @return array
*/
protected static function getPreprocessingFieldDescriptors() {
return [
[
'name' => 'type',
'selector' => 'xpath:.//z-select[contains(@id, "_type")]',
'detect' => true,
'value' => ['getValue']
],
[
'name' => 'parameter_1',
'selector' => 'xpath:.//input[contains(@id, "_params_0")]|.//div[contains(@id, "_params_0")]|'.
'.//z-select[contains(@name, "[params][0]")]',
'detect' => true,
'value' => ['getValue']
],
[
'name' => 'parameter_2',
'selector' => 'xpath:.//input[contains(@id, "_params_1")]|.//z-select[contains(@name, "[params][1]")]',
'detect' => true,
'value' => ['getValue']
],
[
'name' => 'parameter_3',
'selector' => 'xpath:.//input[contains(@id, "_params_2")]',
'detect' => true,
'value' => ['getValue']
],
[
'name' => 'on_fail',
'selector' => 'xpath:.//input[contains(@id, "_on_fail")]',
'class' => 'CCheckboxElement',