@@ -80,15 +80,14 @@ public function testResetCustomerAccountPasswordSuccessfully(): void
8080 /**
8181 * @magentoApiDataFixture Magento/Customer/_files/customer.php
8282 *
83- * @expectedException \Exception
84- * @expectedExceptionMessage You must specify an email address.
85- *
8683 * @throws NoSuchEntityException
8784 * @throws Exception
8885 * @throws LocalizedException
8986 */
9087 public function testEmailAvailableEmptyValue ()
9188 {
89+ $ this ->expectException (\Exception::class);
90+ $ this ->expectExceptionMessage ('You must specify an email address. ' );
9291 $ query = <<<QUERY
9392mutation {
9493 resetPassword (
@@ -104,15 +103,14 @@ public function testEmailAvailableEmptyValue()
104103 /**
105104 * @magentoApiDataFixture Magento/Customer/_files/customer.php
106105 *
107- * @expectedException \Exception
108- * @expectedExceptionMessage The email address has an invalid format.
109- *
110106 * @throws NoSuchEntityException
111107 * @throws Exception
112108 * @throws LocalizedException
113109 */
114110 public function testEmailInvalidValue ()
115111 {
112+ $ this ->expectException (\Exception::class);
113+ $ this ->expectExceptionMessage ('The email address has an invalid format. ' );
116114 $ query = <<<QUERY
117115mutation {
118116 resetPassword (
@@ -128,15 +126,14 @@ public function testEmailInvalidValue()
128126 /**
129127 * @magentoApiDataFixture Magento/Customer/_files/customer.php
130128 *
131- * @expectedException \Exception
132- * @expectedExceptionMessage resetPasswordToken must be specified
133- *
134129 * @throws NoSuchEntityException
135130 * @throws Exception
136131 * @throws LocalizedException
137132 */
138133 public function testResetPasswordTokenEmptyValue ()
139134 {
135+ $ this ->expectException (\Exception::class);
136+ $ this ->expectExceptionMessage ('resetPasswordToken must be specified ' );
140137 $ query = <<<QUERY
141138mutation {
142139 resetPassword (
@@ -152,15 +149,14 @@ public function testResetPasswordTokenEmptyValue()
152149 /**
153150 * @magentoApiDataFixture Magento/Customer/_files/customer.php
154151 *
155- * @expectedException \Exception
156- * @expectedExceptionMessage Cannot set the customer's password
157- *
158152 * @throws NoSuchEntityException
159153 * @throws Exception
160154 * @throws LocalizedException
161155 */
162156 public function testResetPasswordTokenMismatched ()
163157 {
158+ $ this ->expectException (\Exception::class);
159+ $ this ->expectExceptionMessage ('Cannot set the customer \'s password ' );
164160 $ query = <<<QUERY
165161mutation {
166162 resetPassword (
@@ -176,15 +172,14 @@ public function testResetPasswordTokenMismatched()
176172 /**
177173 * @magentoApiDataFixture Magento/Customer/_files/customer.php
178174 *
179- * @expectedException \Exception
180- * @expectedExceptionMessage newPassword must be specified
181- *
182175 * @throws NoSuchEntityException
183176 * @throws Exception
184177 * @throws LocalizedException
185178 */
186179 public function testNewPasswordEmptyValue ()
187180 {
181+ $ this ->expectException (\Exception::class);
182+ $ this ->expectExceptionMessage ('newPassword must be specified ' );
188183 $ query = <<<QUERY
189184mutation {
190185 resetPassword (
@@ -202,14 +197,13 @@ public function testNewPasswordEmptyValue()
202197 *
203198 * @magentoApiDataFixture Magento/Customer/_files/customer.php
204199 *
205- * @expectedException \Exception
206- * @expectedExceptionMessage The account is locked
207- *
208200 * @throws LocalizedException
209201 * @throws NoSuchEntityException
210202 */
211203 public function testPasswordResetForLockCustomer ()
212204 {
205+ $ this ->expectException (\Exception::class);
206+ $ this ->expectExceptionMessage ('The account is locked ' );
213207 $ this ->lockCustomer ->execute (1 );
214208 $ query = <<<QUERY
215209mutation {
0 commit comments