19
19
use Magento \User \Model \User as UserModel ;
20
20
use Magento \User \Test \Fixture \User as UserDataFixture ;
21
21
use Magento \User \Model \UserFactory ;
22
- use Magento \TestFramework \Bootstrap ;
23
- use Magento \Framework \Mail \MessageInterface ;
24
- use Magento \Framework \Mail \MessageInterfaceFactory ;
25
- use Magento \Framework \Mail \TransportInterfaceFactory ;
26
22
27
23
/**
28
24
* Test class for user reset password email
@@ -47,12 +43,12 @@ class UserResetPasswordEmailTest extends AbstractBackendController
47
43
private $ userFactory ;
48
44
49
45
/**
50
- * @var MessageInterfaceFactory
46
+ * @var \Magento\Framework\Mail\ MessageInterfaceFactory
51
47
*/
52
48
private $ messageFactory ;
53
49
54
50
/**
55
- * @var TransportInterfaceFactory
51
+ * @var \Magento\Framework\Mail\ TransportInterfaceFactory
56
52
*/
57
53
private $ transportFactory ;
58
54
@@ -64,8 +60,8 @@ protected function setUp(): void
64
60
parent ::setUp ();
65
61
$ this ->fixtures = DataFixtureStorageManager::getStorage ();
66
62
$ this ->userModel = $ this ->_objectManager ->create (UserModel::class);
67
- $ this ->messageFactory = $ this ->_objectManager ->get (MessageInterfaceFactory::class);
68
- $ this ->transportFactory = $ this ->_objectManager ->get (TransportInterfaceFactory::class);
63
+ $ this ->messageFactory = $ this ->_objectManager ->get (\ Magento \ Framework \ Mail \ MessageInterfaceFactory::class);
64
+ $ this ->transportFactory = $ this ->_objectManager ->get (\ Magento \ Framework \ Mail \ TransportInterfaceFactory::class);
69
65
$ this ->userFactory = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->create (UserFactory::class);
70
66
}
71
67
@@ -100,7 +96,6 @@ private function getResetPasswordUri(EmailMessage $message): string
100
96
101
97
/**
102
98
* Test admin email notification after password change
103
- * @magentoDbIsolation disabled
104
99
* @throws LocalizedException
105
100
*/
106
101
#[
@@ -115,7 +110,7 @@ public function testAdminEmailNotificationAfterPasswordChange()
115
110
116
111
// login with old credentials
117
112
$ adminUser = $ this ->userFactory ->create ();
118
- $ adminUser ->login ($ username , Bootstrap::ADMIN_PASSWORD );
113
+ $ adminUser ->login ($ username , \ Magento \ TestFramework \ Bootstrap::ADMIN_PASSWORD );
119
114
120
115
// Change password
121
116
$ adminUser ->setPassword ('newPassword123 ' );
@@ -148,7 +143,7 @@ private function assertEmailNotificationSent(string $emailAddress)
148
143
$ transport ->sendMessage ();
149
144
150
145
$ sentMessage = $ transport ->getMessage ();
151
- $ this ->assertInstanceOf (MessageInterface::class, $ sentMessage );
146
+ $ this ->assertInstanceOf (\ Magento \ Framework \ Mail \ MessageInterface::class, $ sentMessage );
152
147
$ this ->assertNotNull ($ sentMessage );
153
148
$ this ->assertEquals ($ subject , $ sentMessage ->getSubject ());
154
149
$ this ->assertStringContainsString ($ body , $ sentMessage ->getBody ()->getParts ()[0 ]->getRawContent ());
0 commit comments