-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscribe to correct LoginEvent name #507
Conversation
This fixes the `last_login_time` record being updated when authenticating through the `app:users:checkpassword` command.
4907d87
to
3999816
Compare
Codecov Report
@@ Coverage Diff @@
## main #507 +/- ##
============================================
- Coverage 36.02% 36.01% -0.01%
Complexity 1137 1137
============================================
Files 185 185
Lines 4583 4584 +1
============================================
Hits 1651 1651
- Misses 2932 2933 +1
|
Fixes a deprecation warning.
4831c6e
to
294fa18
Compare
$mailLocation); | ||
$commandTester = new CommandTester($command); | ||
|
||
$commandTester->execute([]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see any assertation here. It would be good to assert that the command returns successfully and the mocked services were called as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the code logic now so that $this->loginListener->expects(self::once())->method('onLogin')
is in the test function itself. Probably it's easier to follow the logic of the test that way.
I also added an assertion to make sure the execute()
call succeeded, but that's not what we want to test here. We want to test whether LoginListener->onLogin()
got triggered.
294fa18
to
618e974
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding the test case. Maybe you can adjust the changelog and we release a patch version afterwards?
This fixes the
last_login_time
record being updated when authenticating through theapp:users:checkpassword
command.