public function setUp() { $this->expectedFields = ['base_fieldset', 'template_code', 'template_subject', 'orig_template_variables', 'variables', 'template_variables', 'insert_variable', 'template_text', 'template_styles']; $this->objectManager = Bootstrap::getObjectManager(); $this->template = $this->objectManager->get('Magento\\Email\\Model\\Template')->setId(1)->setTemplateType(TemplateTypesInterface::TYPE_HTML); $this->registry = $this->objectManager->get('Magento\\Framework\\Registry'); if ($this->registry->registry('current_email_template') == null) { $this->registry->register('current_email_template', $this->template); } $this->block = $this->objectManager->create('Magento\\Email\\Block\\Adminhtml\\Template\\Edit\\Form'); $this->prepareFormMethod = new \ReflectionMethod('Magento\\Email\\Block\\Adminhtml\\Template\\Edit\\Form', '_prepareForm'); $this->prepareFormMethod->setAccessible(true); }