fields = Array( 'name' => Array( 'width' => '40%', 'label' => 'LBL_LIST_ACCOUNT_NAME', 'link' => 1, 'default' => 1, 'name' => 'name', ), ); require('include/modules.php'); $GLOBALS['beanList'] = $beanList; $GLOBALS['beanFiles'] = $beanFiles; $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']); } function tearDown() { if (is_file('custom/modules/Accounts/metadata/popupdefs.php')) { unlink('custom/modules/Accounts/metadata/popupdefs.php'); } if (is_file('custom/modules/Prospects/metadata/popupdefs.php')) { unlink('custom/modules/Prospects/metadata/popupdefs.php'); } unset($GLOBALS['beanList']); unset($GLOBALS['beanFiles']); unset($GLOBALS['app_list_strings']); } /** * @outputBuffering enabled */ function testUpdateCustomAccountMetadataPopupdefsSave() { $this->parser = new PopupMetaDataParser('popuplist', 'Accounts'); $this->parser->_viewdefs = $this->fields; $this->parser->handleSave(false); require('custom/modules/Accounts/metadata/popupdefs.php'); $this->assertEquals('LNK_NEW_ACCOUNT', $popupMeta['create']['createButton']); unset($popupMeta); unset($this->parser); } /** * @outputBuffering enabled */ function testUpdateCustomProspectsMetadataPopupdefsSave() { $this->useOutputBuffering = false; $this->parser = new PopupMetaDataParser('popuplist', 'Prospects'); $this->parser->_viewdefs = $this->fields; $this->parser->handleSave(false); require('custom/modules/Prospects/metadata/popupdefs.php'); $this->assertEquals('LNK_NEW_PROSPECT', $popupMeta['create']['createButton']); unset($popupMeta); unset($this->parser); } }