/** * @covers \Magento\Email\Controller\Adminhtml\Email\Template\Edit::execute */ public function testExecuteEdit() { $this->requestMock->expects($this->any())->method('getParam')->with('id')->willReturn(1); $this->registryMock->expects($this->atLeastOnce())->method('registry')->willReturnMap([['email_template', false], ['current_email_template', false]]); $this->pageTitleMock->expects($this->any())->method('prepend')->willReturnMap([['Email Templates', $this->returnSelf()], ['My Template', $this->returnSelf()]]); $this->breadcrumbsBlockMock->expects($this->any())->method('addLink')->willReturnMap([['Transactional Emails', 'Transactional Emails', null, $this->returnSelf()], ['Edit Template', 'Edit System Template', null, $this->returnSelf()]]); $this->assertNull($this->editController->execute()); }
/** * {@inheritdoc} */ public function dispatch(\Magento\Framework\App\RequestInterface $request) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'dispatch'); if (!$pluginInfo) { return parent::dispatch($request); } else { return $this->___callPlugins('dispatch', func_get_args(), $pluginInfo); } }