Skip to content

Commit

Permalink
tests: add non-standard URL case
Browse files Browse the repository at this point in the history
  • Loading branch information
shvlv committed Mar 15, 2024
1 parent f842c30 commit 332b725
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/phpunit/Unit/OutputFilter/AttributesOutputFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ public function provideRenderWithInlineScripts(): \Generator
console.log("script with multiple lines")
})();
JS;
$multiByteLine = '<script>(function(){ console.log("Lösungen ї 𠀋"); })();</script>';
$nonStandardUrl = '<script src="http://[::1]:5173/path/to/build/@vite/client"></script>';

yield 'before single line' => [
$singleLineJs,
Expand Down Expand Up @@ -220,8 +222,13 @@ public function provideRenderWithInlineScripts(): \Generator
];

yield 'before and after multibyte line' => [
'<script>(function(){ console.log("Lösungen ї 𠀋"); })();</script>',
'<script>(function(){ console.log("Lösungen ї 𠀋"); })();</script>',
$multiByteLine,
$multiByteLine,
];

yield 'before and after URL with non-alphanumeric characters' => [
$nonStandardUrl,
$nonStandardUrl,
];
}
}

0 comments on commit 332b725

Please sign in to comment.