From 6a43bc2450c848c2147c16754e018300189c85bf Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 5 Sep 2024 16:40:00 +0900 Subject: [PATCH] test: add tests for auto_link() --- tests/system/Helpers/URLHelper/MiscUrlTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/system/Helpers/URLHelper/MiscUrlTest.php b/tests/system/Helpers/URLHelper/MiscUrlTest.php index 125356e7d0ed..219b5322dbb5 100644 --- a/tests/system/Helpers/URLHelper/MiscUrlTest.php +++ b/tests/system/Helpers/URLHelper/MiscUrlTest.php @@ -533,6 +533,10 @@ public static function provideAutoLinkUrl(): iterable 'Visit www.example.com or email foo@bar.com', 'Visit www.example.com or email foo@bar.com', ], + 'trailing slash' => [ + 'Trailing slash: https://codeigniter.com/ fubar', + 'Trailing slash: https://codeigniter.com/ fubar', + ], ]; } @@ -629,6 +633,10 @@ public static function provideAutolinkBoth(): iterable 'Visit www.example.com or email foo@bar.com', "Visit www.example.com or email ", ], + 'email starting with "www."' => [ + 'this is some text that includes www.email@domain.com which is causing an issue', + 'this is some text that includes ' . safe_mailto('www.email@domain.com') . ' which is causing an issue', + ], ]; }