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
28
28
public function testExecuteExpectsDeleteUserAttemptsCalled ()
29
29
{
30
30
$ logMock = $ this ->createMock (Log::class);
31
- $ logMock ->expects ($ this ->once ())->method ('deleteUserAttempts ' );
31
+ $ logMock ->expects ($ this ->once ())->method ('deleteUserAttempts ' )-> willReturnSelf () ;
32
32
33
33
$ resLogFactoryMock = $ this ->createMock (LogFactory::class);
34
34
$ resLogFactoryMock ->expects ($ this ->once ())
@@ -48,6 +48,6 @@ public function testExecuteExpectsDeleteUserAttemptsCalled()
48
48
ResetAttemptForBackendObserver::class,
49
49
['resLogFactory ' => $ resLogFactoryMock ]
50
50
);
51
- $ observer ->execute ($ eventObserverMock );
51
+ $ this -> assertInstanceOf (Log::class, $ observer ->execute ($ eventObserverMock) );
52
52
}
53
53
}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class ResetAttemptForFrontendObserverTest extends TestCase
28
28
public function testExecuteExpectsDeleteUserAttemptsCalled ()
29
29
{
30
30
$ logMock = $ this ->createMock (Log::class);
31
- $ logMock ->expects ($ this ->once ())->method ('deleteUserAttempts ' );
31
+ $ logMock ->expects ($ this ->once ())->method ('deleteUserAttempts ' )-> willReturnSelf () ;
32
32
33
33
$ resLogFactoryMock = $ this ->createMock (LogFactory::class);
34
34
$ resLogFactoryMock ->expects ($ this ->once ())
@@ -47,6 +47,6 @@ public function testExecuteExpectsDeleteUserAttemptsCalled()
47
47
ResetAttemptForFrontendObserver::class,
48
48
['resLogFactory ' => $ resLogFactoryMock ]
49
49
);
50
- $ observer ->execute ($ eventObserverMock );
50
+ $ this -> assertInstanceOf (Log::class, $ observer ->execute ($ eventObserverMock) );
51
51
}
52
52
}
You can’t perform that action at this time.
0 commit comments