File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
app/code/Magento/Captcha/Test/Unit/Observer Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class ResetAttemptForBackendObserverTest extends TestCase
2828 public function testExecuteExpectsDeleteUserAttemptsCalled ()
2929 {
3030 $ logMock = $ this ->createMock (Log::class);
31- $ logMock ->expects ($ this ->once ())->method ('deleteUserAttempts ' );
31+ $ logMock ->expects ($ this ->once ())->method ('deleteUserAttempts ' )-> willReturnSelf () ;
3232
3333 $ resLogFactoryMock = $ this ->createMock (LogFactory::class);
3434 $ resLogFactoryMock ->expects ($ this ->once ())
@@ -48,6 +48,6 @@ public function testExecuteExpectsDeleteUserAttemptsCalled()
4848 ResetAttemptForBackendObserver::class,
4949 ['resLogFactory ' => $ resLogFactoryMock ]
5050 );
51- $ observer ->execute ($ eventObserverMock );
51+ $ this -> assertInstanceOf (Log::class, $ observer ->execute ($ eventObserverMock) );
5252 }
5353}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class ResetAttemptForFrontendObserverTest extends TestCase
2828 public function testExecuteExpectsDeleteUserAttemptsCalled ()
2929 {
3030 $ logMock = $ this ->createMock (Log::class);
31- $ logMock ->expects ($ this ->once ())->method ('deleteUserAttempts ' );
31+ $ logMock ->expects ($ this ->once ())->method ('deleteUserAttempts ' )-> willReturnSelf () ;
3232
3333 $ resLogFactoryMock = $ this ->createMock (LogFactory::class);
3434 $ resLogFactoryMock ->expects ($ this ->once ())
@@ -47,6 +47,6 @@ public function testExecuteExpectsDeleteUserAttemptsCalled()
4747 ResetAttemptForFrontendObserver::class,
4848 ['resLogFactory ' => $ resLogFactoryMock ]
4949 );
50- $ observer ->execute ($ eventObserverMock );
50+ $ this -> assertInstanceOf (Log::class, $ observer ->execute ($ eventObserverMock) );
5151 }
5252}
You can’t perform that action at this time.
0 commit comments