@@ -341,7 +341,7 @@ public function testResetPasswordActionCoreException()
341
341
// Verify error message is set
342
342
$ this ->messageManager ->expects ($ this ->once ())
343
343
->method ('addMessage ' )
344
- ->with ($ this -> equalTo ( $ error) );
344
+ ->with ($ error );
345
345
346
346
$ this ->_testedObject ->execute ();
347
347
}
@@ -353,8 +353,8 @@ public function testResetPasswordActionCoreExceptionWarn()
353
353
354
354
$ this ->_request ->expects ($ this ->once ())
355
355
->method ('getParam ' )
356
- ->with ($ this -> equalTo ( 'customer_id ' ), $ this -> equalTo ( 0 ) )
357
- ->will ( $ this -> returnValue ( $ customerId) );
356
+ ->with ('customer_id ' , 0 )
357
+ ->willReturn ( $ customerId );
358
358
359
359
// Setup a core exception to return
360
360
$ exception = new \Magento \Framework \Validator \ValidatorException ($ warningText );
@@ -365,13 +365,12 @@ public function testResetPasswordActionCoreExceptionWarn()
365
365
$ this ->_customerRepositoryMock ->expects ($ this ->once ())
366
366
->method ('getById ' )
367
367
->with ($ customerId )
368
- ->will ( $ this -> throwException ( $ exception) );
368
+ ->willThrowException ( $ exception );
369
369
370
370
// Verify Warning is converted to an Error and message text is set to exception text
371
371
$ this ->messageManager ->expects ($ this ->once ())
372
372
->method ('addMessage ' )
373
- ->with ($ this ->equalTo (new \Magento \Framework \Message \Error ($ warningText ))
374
- );
373
+ ->with (new \Magento \Framework \Message \Error ($ warningText ));
375
374
376
375
$ this ->_testedObject ->execute ();
377
376
}
0 commit comments