Use mb_strlen instead of grapheme_strlen

Due to inconsistent behave, mb_strlen will be used.
This commit is contained in:
Daniel Ang
2021-08-29 12:55:37 +02:00
parent 851ce36010
commit 042f2ec3f3
3 changed files with 3 additions and 4 deletions

View File

@ -333,7 +333,7 @@ final class Expectation
public function toHaveLength(int $number): Expectation
{
if (is_string($this->value)) {
Assert::assertEquals($number, grapheme_strlen($this->value));
Assert::assertEquals($number, mb_strlen($this->value));
return $this;
}