Skip to content

Commit f7044f9

Browse files
akaashakaash
authored andcommitted
PR Feedback
1 parent 3b51296 commit f7044f9

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

dev/tests/integration/testsuite/Magento/Email/Model/Template/NewAccountEmailTemplateTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Magento\TestFramework\Mail\Template\TransportBuilderMock;
2020
use Magento\TestFramework\Bootstrap as TestFrameworkBootstrap;
2121

22-
2322
/**
2423
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2524
*/
@@ -38,7 +37,6 @@ class NewAccountEmailTemplateTest extends \PHPUnit\Framework\TestCase
3837

3938
protected $storeData = array();
4039

41-
4240
/**
4341
* Set up
4442
*/
@@ -48,13 +46,16 @@ protected function setUp(): void
4846

4947
$this->objectManager = Bootstrap::getObjectManager();
5048
$this->config = $this->objectManager->get(ScopeConfigInterface::class);
51-
$this->storeData['name'] = $this->config->getValue('general/store_information/name', ScopeInterface::SCOPE_STORES);
52-
$this->storeData['phone'] = $this->config->getValue('general/store_information/phone', ScopeInterface::SCOPE_STORES);
53-
$this->storeData['city'] = $this->config->getValue('general/store_information/city', ScopeInterface::SCOPE_STORES);
54-
$this->storeData['country'] = $this->config->getValue('general/store_information/country_id', ScopeInterface::SCOPE_STORES);
49+
$this->storeData['name'] = $this->config->getValue(
50+
'general/store_information/name', ScopeInterface::SCOPE_STORES);
51+
$this->storeData['phone'] = $this->config->getValue(
52+
'general/store_information/phone', ScopeInterface::SCOPE_STORES);
53+
$this->storeData['city'] = $this->config->getValue(
54+
'general/store_information/city', ScopeInterface::SCOPE_STORES);
55+
$this->storeData['country'] = $this->config->getValue(
56+
'general/store_information/country_id', ScopeInterface::SCOPE_STORES);
5557
}
5658

57-
5859
/**
5960
* @magentoConfigFixture current_store general/store_information/name TestStore
6061
* @magentoConfigFixture default_store general/store_information/phone 5124666492
@@ -65,7 +66,7 @@ protected function setUp(): void
6566
* @magentoConfigFixture default_store general/store_information/zip 78739
6667
* @magentoConfigFixture default_store general/store_information/country_id US
6768
* @magentoConfigFixture default_store general/store_information/region_id 57
68-
* @magentoDataFixture Magento/Email/Model/_files/email_template_new_user_welcome.php
69+
* @magentoDataFixture Magento/Email/Model/_files/email_template.php
6970
*/
7071
public function testNewAccountEmailTemplate(): void
7172
{
@@ -74,9 +75,9 @@ public function testNewAccountEmailTemplate(): void
7475
$config = Bootstrap::getObjectManager()
7576
->get(MutableScopeConfigInterface::class);
7677
$config->setValue(
77-
'admin/emails/new_user_notification_template',
78+
'admin/emails/email_template',
7879
$this->getCustomEmailTemplateId(
79-
'admin_emails_new_user_notification_template'
80+
'template_fixture'
8081
)
8182
);
8283

@@ -113,7 +114,6 @@ public function testNewAccountEmailTemplate(): void
113114

114115
}
115116

116-
117117
/**
118118
* Return email template id by origin template code
119119
*
@@ -141,4 +141,4 @@ private function getCustomEmailTemplateId(string $origTemplateCode): ?int
141141
return $templateId;
142142
}
143143

144-
}
144+
}

dev/tests/integration/testsuite/Magento/Email/Model/_files/email_template.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
[
1313
'template_text' => file_get_contents(__DIR__ . '/template_fixture.html'),
1414
'template_code' => \Magento\Theme\Model\Config\ValidatorTest::TEMPLATE_CODE,
15-
'template_type' => \Magento\Email\Model\Template::TYPE_TEXT
15+
'template_type' => \Magento\Email\Model\Template::TYPE_TEXT,
16+
'orig_template_code' => 'template_fixture'
1617
]
1718
);
1819
$template->save();

0 commit comments

Comments
 (0)