19
19
use Magento \TestFramework \Mail \Template \TransportBuilderMock ;
20
20
use Magento \TestFramework \Bootstrap as TestFrameworkBootstrap ;
21
21
22
-
23
22
/**
24
23
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
25
24
*/
@@ -38,7 +37,6 @@ class NewAccountEmailTemplateTest extends \PHPUnit\Framework\TestCase
38
37
39
38
protected $ storeData = array ();
40
39
41
-
42
40
/**
43
41
* Set up
44
42
*/
@@ -48,13 +46,16 @@ protected function setUp(): void
48
46
49
47
$ this ->objectManager = Bootstrap::getObjectManager ();
50
48
$ 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 );
55
57
}
56
58
57
-
58
59
/**
59
60
* @magentoConfigFixture current_store general/store_information/name TestStore
60
61
* @magentoConfigFixture default_store general/store_information/phone 5124666492
@@ -65,7 +66,7 @@ protected function setUp(): void
65
66
* @magentoConfigFixture default_store general/store_information/zip 78739
66
67
* @magentoConfigFixture default_store general/store_information/country_id US
67
68
* @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
69
70
*/
70
71
public function testNewAccountEmailTemplate (): void
71
72
{
@@ -74,9 +75,9 @@ public function testNewAccountEmailTemplate(): void
74
75
$ config = Bootstrap::getObjectManager ()
75
76
->get (MutableScopeConfigInterface::class);
76
77
$ config ->setValue (
77
- 'admin/emails/new_user_notification_template ' ,
78
+ 'admin/emails/email_template ' ,
78
79
$ this ->getCustomEmailTemplateId (
79
- 'admin_emails_new_user_notification_template '
80
+ 'template_fixture '
80
81
)
81
82
);
82
83
@@ -113,7 +114,6 @@ public function testNewAccountEmailTemplate(): void
113
114
114
115
}
115
116
116
-
117
117
/**
118
118
* Return email template id by origin template code
119
119
*
@@ -141,4 +141,4 @@ private function getCustomEmailTemplateId(string $origTemplateCode): ?int
141
141
return $ templateId ;
142
142
}
143
143
144
- }
144
+ }
0 commit comments