Repository navigation
Conversation
neznaika0
force-pushed
the
test/personal-validator
branch
from
November 13, 2026 16:01
fc43695 to
4eafdfe
Compare
| public function check(string $password, ?User $user = null): Result | ||
| { | ||
| $password = strtolower($password); | ||
| $password = mb_strtolower($password); |
Member
There was a problem hiding this comment.
The MBString mutation suggests the tests did not cover multibyte passwords, which this change is anchoring on.
Contributor
Author
There was a problem hiding this comment.
I haven’t used Infection. Does this mean that my version of the tests works in both strtolower() variants?
Perhaps it will work if the exact strings are the same. But we understand that there is a difference:
$ php -r "var_dump(strtolower('ПёТр'), mb_strtolower('ПёТр')); ";
string(8) "ПёТр"
string(8) "пётр"
Member
There was a problem hiding this comment.
yes, your test passes in both variants. infection must see your test fails when it changes things to say you covered the mutant
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
check(). Otherwise, it’s unclear at which stage the error occurs.There is a proposal to move
mb_strtolower($password)inside for clarity.$trivialcheck now loses its relevance for other languages.User = nullis passedstrip_explode()also understands UnicodeChecklist: