From 33ca8697eacdc5d9ce108252ddd1a2858f42137f Mon Sep 17 00:00:00 2001 From: Valery Maslov Date: Fri, 5 May 2023 14:36:02 +0300 Subject: [PATCH] Minor fix --- tests/E2E/User/GoogleAuthenticatorTest.php | 2 +- .../User/Security/GoogleAuthenticatorControllerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/E2E/User/GoogleAuthenticatorTest.php b/tests/E2E/User/GoogleAuthenticatorTest.php index c602ca4c..80cc86ce 100644 --- a/tests/E2E/User/GoogleAuthenticatorTest.php +++ b/tests/E2E/User/GoogleAuthenticatorTest.php @@ -35,7 +35,7 @@ public function testSetUpAuthenticator(): void $client->clickLink('Set up Google Authenticator'); $crawler = $client->waitForVisibility('#generatedSecret'); $secret = $crawler->filter('#generatedSecret')->text(); - $this->assertSame(52, \strlen($secret)); + $this->assertSame(52, mb_strlen($secret)); self::$secret = $secret; diff --git a/tests/Functional/Controller/User/Security/GoogleAuthenticatorControllerTest.php b/tests/Functional/Controller/User/Security/GoogleAuthenticatorControllerTest.php index dddb7bb6..0e76db4b 100644 --- a/tests/Functional/Controller/User/Security/GoogleAuthenticatorControllerTest.php +++ b/tests/Functional/Controller/User/Security/GoogleAuthenticatorControllerTest.php @@ -45,7 +45,7 @@ public function testGetAuthCode(): void $this->assertResponseIsSuccessful(); $response = $client->getResponse(); $this->assertJson($response->getContent()); - $this->assertTrue(\strlen($response->getContent()) > 2000 && \strlen($response->getContent()) < 3100); + $this->assertTrue(mb_strlen($response->getContent()) > 2000 && mb_strlen($response->getContent()) < 3100); $this->assertContainsWords($response, ['secret', 'qr_code', 'data:image', 'png;base64']); }