diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-05-27 04:58:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 04:58:30 +0300 |
commit | c973567705a0065fdd7d7c7b11b80f1f0f1be350 (patch) | |
tree | 89947dbce864ac48389c742fce31d30106eebada /plugins/TwoFactorAuth/tests/Integration | |
parent | 70b05de003487a31495bb9927017606a2faab7dd (diff) |
Update PHP extension requirements & deprecate Common::mb_* methods (#16754)
* Require polyfill for mbstring and iconv
* remove mbstring methods from upgrade.php
* remove checks for some php extensions
* deprecate Common::mb_* methods, as we can directly use mb_* functions instead
* updates expected test files
* Directly use mb_* methods in favor of Common::mb_*
* Update expected screenshot
Co-authored-by: diosmosis <diosmosis@users.noreply.github.com>
Diffstat (limited to 'plugins/TwoFactorAuth/tests/Integration')
4 files changed, 4 insertions, 4 deletions
diff --git a/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeRandomGeneratorTest.php b/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeRandomGeneratorTest.php index cc51316e33..d47292d09c 100644 --- a/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeRandomGeneratorTest.php +++ b/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeRandomGeneratorTest.php @@ -33,7 +33,7 @@ class RecoveryCodeRandomGeneratorTest extends IntegrationTestCase public function test_generatorCode_length() { - $this->assertSame(16, Common::mb_strlen($this->generator->generateCode())); + $this->assertSame(16, mb_strlen($this->generator->generateCode())); } public function test_generatorCode_alwaysDifferent() diff --git a/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeStaticGeneratorTest.php b/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeStaticGeneratorTest.php index 1d5193208d..a5668ebb17 100644 --- a/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeStaticGeneratorTest.php +++ b/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeStaticGeneratorTest.php @@ -33,7 +33,7 @@ class RecoveryCodeStaticGeneratorTest extends IntegrationTestCase public function test_generatorCode_length() { - $this->assertSame(16, Common::mb_strlen($this->generator->generateCode())); + $this->assertSame(16, mb_strlen($this->generator->generateCode())); } public function test_generatorCode_alwaysDifferent() diff --git a/plugins/TwoFactorAuth/tests/Integration/Dao/TwoFaSecretRandomGeneratorTest.php b/plugins/TwoFactorAuth/tests/Integration/Dao/TwoFaSecretRandomGeneratorTest.php index bdd847205e..6f04416457 100644 --- a/plugins/TwoFactorAuth/tests/Integration/Dao/TwoFaSecretRandomGeneratorTest.php +++ b/plugins/TwoFactorAuth/tests/Integration/Dao/TwoFaSecretRandomGeneratorTest.php @@ -33,7 +33,7 @@ class TwoFaSecretRandomGeneratorTest extends IntegrationTestCase public function test_generatorCode_length() { - $this->assertSame(16, Common::mb_strlen($this->generator->generateSecret())); + $this->assertSame(16, mb_strlen($this->generator->generateSecret())); } public function test_generatorCode_alwaysDifferent() diff --git a/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthenticationTest.php b/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthenticationTest.php index 3b466e6a04..b4ede7e6ab 100644 --- a/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthenticationTest.php +++ b/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthenticationTest.php @@ -56,7 +56,7 @@ class TwoFactorAuthenticationTest extends IntegrationTestCase public function test_generateSecret() { - $this->assertSame(16, Common::mb_strlen($this->twoFa->generateSecret())); + $this->assertSame(16, mb_strlen($this->twoFa->generateSecret())); } public function test_isUserRequiredToHaveTwoFactorEnabled_notByDefault() |