require_once dirname(__FILE__).'/../include/CLegacyWebTest.php';
class testFormAdministrationGeneralOtherParams extends CLegacyWebTest {
public static function allValues() {
return CDBHelper::getDataProvider('SELECT refresh_unsupported, snmptrap_logging FROM config ORDER BY configid');
public static function allGroups() {
return CDBHelper::getDataProvider('SELECT name FROM hstgrp ORDER BY groupid');
public static function AlertUsrgrpid() {
return CDBHelper::getDataProvider('SELECT * FROM usrgrp ORDER BY usrgrpid');
public function testFormAdministrationGeneralOtherParams_CheckLayout($allValues) {
$this->zbxTestLogin('zabbix.php?action=miscconfig.edit');
$this->zbxTestCheckTitle('Other configuration parameters');
$this->zbxTestCheckHeader('Other configuration parameters');
$this->zbxTestAssertElementValue('refresh_unsupported', $allValues['refresh_unsupported']);
if ($allValues['snmptrap_logging']) {
$this->assertTrue($this->zbxTestCheckboxSelected('snmptrap_logging'));
if ($allValues['snmptrap_logging']==0) {
$this->assertFalse($this->zbxTestCheckboxSelected('snmptrap_logging'));
$this->zbxTestAssertElementPresentId('refresh_unsupported');
$this->zbxTestAssertElementPresentId('snmptrap_logging');
$this->zbxTestAssertElementPresentId('default_inventory_mode');
$this->zbxTestAssertElementPresentId('discovery_groupid');
$this->zbxTestAssertElementPresentId('alert_usrgrpid');