$this->assertEquals([$data['macro_fields']['value']['text'], $data['macro_fields']['description'], ZBX_MACRO_TYPE_VAULT],
require_once dirname(__FILE__).'/../../include/helpers/CDataHelper.php';
require_once dirname(__FILE__).'/../common/testFormMacros.php';
use Facebook\WebDriver\WebDriverBy;
class testFormMacrosAdministrationGeneral extends testFormMacros {
const NEW_MACRO = '{$NEW_MACRO}';
const NEW_VALUE = 'Value of the new macro';
const NEW_DESCRIPTION = 'New test description';
const NEW_EMPTY_MACRO = '{$NEW_EMPTY_MACRO}';
const OLD_GLOBAL_MACROID = 7;
const UPDATE_MACRO = '{$UPD_MACRO}';
const UPDATE_VALUE = 'Value of the updated macro';
const UPDATE_DESCRIPTION = 'Description of the updated macro';
protected $sqlHashGlobalMacros;
protected $oldHashGlobalMacros;
protected $vault_object = 'macros';
protected $hashi_error_field = '/1/value';
protected $cyber_error_field = '/1/value';
protected $update_vault_macro = '{$1_VAULT_MACRO_CHANGED}';
protected $vault_macro_index = 1;
protected $macro_resolve = '{$Z_GLOBAL_MACRO_2_RESOLVE}';
protected static $macro_resolve_hostid;
public function prepareHostMacrosData() {
$hosts = CDataHelper::createHosts([
'host' => 'Host for checking global macro',
'groups' => ['groupid' => self::ZABBIX_SERVERS_GROUPID],
'name' => 'Macro value: {$Z_GLOBAL_MACRO_2_RESOLVE}',
'key_' => 'trap[{$Z_GLOBAL_MACRO_2_RESOLVE}]',
'type' => ITEM_TYPE_TRAPPER,
'value_type' => ITEM_VALUE_TYPE_UINT64