diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-10-28 10:30:14 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-10-28 10:30:14 +0200 |
commit | 158e73242ee692f398215a9fcbdc6aa60347e396 (patch) | |
tree | a6bf0ebd04e306ea8810b93cd56ce4cbf27524af /apps/user_ldap/tests | |
parent | 9b7258fca578772fff62cd57c7eac23463cd8ade (diff) | |
download | nextcloud-server-158e73242ee692f398215a9fcbdc6aa60347e396.tar.gz nextcloud-server-158e73242ee692f398215a9fcbdc6aa60347e396.zip |
Avoid use of iconv to get rid of unicode
Using iconv for translit depends upon server configuration, locale, and
PHP version. Using htmlentities instead to have a consistent behavior
independent of configuration.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap/tests')
-rw-r--r-- | apps/user_ldap/tests/AccessTest.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index 5945bbd2fde..c0cc856d143 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -689,16 +689,13 @@ class AccessTest extends TestCase { } public function intUsernameProvider() { - // system dependent :-/ - $translitExpected = @iconv('UTF-8', 'ASCII//TRANSLIT', 'fränk') ? 'frank' : 'frnk'; - return [ ['alice', 'alice'], ['b/ob', 'bob'], ['charly🐬', 'charly'], ['debo rah', 'debo_rah'], ['epost@poste.test', 'epost@poste.test'], - ['fränk', $translitExpected], + ['fränk', 'frank'], [' gerda ', 'gerda'], ['🕱🐵🐘🐑', null], [ @@ -732,9 +729,6 @@ class AccessTest extends TestCase { * @param $expected */ public function testSanitizeUsername($name, $expected) { - if ($name === 'fränk' && PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Special chars do boom still on CI in php8'); - } if ($expected === null) { $this->expectException(\InvalidArgumentException::class); } |