1919use Magento \TestFramework \Mail \Template \TransportBuilderMock ;
2020use 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+ }
0 commit comments