Skip to content

Commit cd29c58

Browse files
author
Oleh Posyniak
committed
MAGETWO-44455: Email Templates - When new email template created, clicking Preview button, display empty page.
1 parent a189658 commit cd29c58

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/code/Magento/Email/Test/Unit/Block/Adminhtml/Template/PreviewTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ public function testToHtml($requestParamMap)
5858
$designConfigData
5959
));
6060
$emailFactory = $this->getMock('Magento\Email\Model\TemplateFactory', ['create'], [], '', false);
61-
$emailFactory->expects($this->once())
61+
$emailFactory->expects($this->any())
6262
->method('create')
63-
->with([])
6463
->willReturn($template);
6564

6665
$request = $this->getMock('Magento\Framework\App\RequestInterface');
@@ -109,6 +108,7 @@ public function testToHtml($requestParamMap)
109108
->with($this->equalTo($requestParamMap[1][2]))
110109
->willReturn(self::MALICIOUS_TEXT);
111110

111+
/** @var \Magento\Email\Block\Adminhtml\Template\Preview $preview */
112112
$preview = $this->objectManagerHelper->getObject(
113113
'Magento\Email\Block\Adminhtml\Template\Preview',
114114
[

app/code/Magento/Email/Test/Unit/Controller/Adminhtml/Email/Template/PreviewTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ protected function setUp()
7171
->disableOriginalConstructor()
7272
->getMock();
7373
$this->requestMock = $this->getMockBuilder('Magento\Framework\App\RequestInterface')
74-
->disableOriginalConstructor()
7574
->getMock();
7675
$this->pageMock = $this->getMockBuilder('Magento\Framework\View\Result\Page')
7776
->disableOriginalConstructor()

0 commit comments

Comments
 (0)