diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-15 19:20:45 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-15 19:20:45 +0000 |
| commit | 6899773092a6b73ab053be884a94033894aeb5e4 (patch) | |
| tree | ee3e8127672681f9a65f9bb2cb96d793581308cf /tests | |
| parent | 9cdccef4cfc8cc02af4897c17b7a9572f96529fa (diff) | |
update algo26-matthias/idna-convert v4.0.2, remove bogus code and add test, fixes #4149
Closes #4149
Merge request studip/studip!2989
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/lib/VisualTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/lib/VisualTest.php b/tests/unit/lib/VisualTest.php index c62cd05..ae9263f 100644 --- a/tests/unit/lib/VisualTest.php +++ b/tests/unit/lib/VisualTest.php @@ -21,6 +21,7 @@ class VisualFunctionsTest extends \Codeception\Test\Unit static $config = [ 'LOAD_EXTERNAL_MEDIA' => 'allow', 'OPENGRAPH_ENABLE' => false, + 'CONVERT_IDNA_URL' => true, ]; Config::set(new Config($config)); @@ -224,6 +225,16 @@ class VisualFunctionsTest extends \Codeception\Test\Unit $this->assertEquals($expected, formatReady($input)); } + public function testIdnaLink() + { + $input = htmlentities('https://www.täst-dömäne-mit-ümläuten.de'); + + $this->assertEquals( + 'https://www.xn--tst-dmne-mit-mluten-gwbfj61b7e.de', + idna_link($input) + ); + } + private function wrap($string) { return sprintf(FORMATTED_CONTENT_WRAPPER, $string); |
