@@ -80,15 +80,14 @@ public function testResetCustomerAccountPasswordSuccessfully(): void
80
80
/**
81
81
* @magentoApiDataFixture Magento/Customer/_files/customer.php
82
82
*
83
- * @expectedException \Exception
84
- * @expectedExceptionMessage You must specify an email address.
85
- *
86
83
* @throws NoSuchEntityException
87
84
* @throws Exception
88
85
* @throws LocalizedException
89
86
*/
90
87
public function testEmailAvailableEmptyValue ()
91
88
{
89
+ $ this ->expectException (\Exception::class);
90
+ $ this ->expectExceptionMessage ('You must specify an email address. ' );
92
91
$ query = <<<QUERY
93
92
mutation {
94
93
resetPassword (
@@ -104,15 +103,14 @@ public function testEmailAvailableEmptyValue()
104
103
/**
105
104
* @magentoApiDataFixture Magento/Customer/_files/customer.php
106
105
*
107
- * @expectedException \Exception
108
- * @expectedExceptionMessage The email address has an invalid format.
109
- *
110
106
* @throws NoSuchEntityException
111
107
* @throws Exception
112
108
* @throws LocalizedException
113
109
*/
114
110
public function testEmailInvalidValue ()
115
111
{
112
+ $ this ->expectException (\Exception::class);
113
+ $ this ->expectExceptionMessage ('The email address has an invalid format. ' );
116
114
$ query = <<<QUERY
117
115
mutation {
118
116
resetPassword (
@@ -128,15 +126,14 @@ public function testEmailInvalidValue()
128
126
/**
129
127
* @magentoApiDataFixture Magento/Customer/_files/customer.php
130
128
*
131
- * @expectedException \Exception
132
- * @expectedExceptionMessage resetPasswordToken must be specified
133
- *
134
129
* @throws NoSuchEntityException
135
130
* @throws Exception
136
131
* @throws LocalizedException
137
132
*/
138
133
public function testResetPasswordTokenEmptyValue ()
139
134
{
135
+ $ this ->expectException (\Exception::class);
136
+ $ this ->expectExceptionMessage ('resetPasswordToken must be specified ' );
140
137
$ query = <<<QUERY
141
138
mutation {
142
139
resetPassword (
@@ -152,15 +149,14 @@ public function testResetPasswordTokenEmptyValue()
152
149
/**
153
150
* @magentoApiDataFixture Magento/Customer/_files/customer.php
154
151
*
155
- * @expectedException \Exception
156
- * @expectedExceptionMessage Cannot set the customer's password
157
- *
158
152
* @throws NoSuchEntityException
159
153
* @throws Exception
160
154
* @throws LocalizedException
161
155
*/
162
156
public function testResetPasswordTokenMismatched ()
163
157
{
158
+ $ this ->expectException (\Exception::class);
159
+ $ this ->expectExceptionMessage ('Cannot set the customer \'s password ' );
164
160
$ query = <<<QUERY
165
161
mutation {
166
162
resetPassword (
@@ -176,15 +172,14 @@ public function testResetPasswordTokenMismatched()
176
172
/**
177
173
* @magentoApiDataFixture Magento/Customer/_files/customer.php
178
174
*
179
- * @expectedException \Exception
180
- * @expectedExceptionMessage newPassword must be specified
181
- *
182
175
* @throws NoSuchEntityException
183
176
* @throws Exception
184
177
* @throws LocalizedException
185
178
*/
186
179
public function testNewPasswordEmptyValue ()
187
180
{
181
+ $ this ->expectException (\Exception::class);
182
+ $ this ->expectExceptionMessage ('newPassword must be specified ' );
188
183
$ query = <<<QUERY
189
184
mutation {
190
185
resetPassword (
@@ -202,14 +197,13 @@ public function testNewPasswordEmptyValue()
202
197
*
203
198
* @magentoApiDataFixture Magento/Customer/_files/customer.php
204
199
*
205
- * @expectedException \Exception
206
- * @expectedExceptionMessage The account is locked
207
- *
208
200
* @throws LocalizedException
209
201
* @throws NoSuchEntityException
210
202
*/
211
203
public function testPasswordResetForLockCustomer ()
212
204
{
205
+ $ this ->expectException (\Exception::class);
206
+ $ this ->expectExceptionMessage ('The account is locked ' );
213
207
$ this ->lockCustomer ->execute (1 );
214
208
$ query = <<<QUERY
215
209
mutation {
0 commit comments