From b6029d7ad1377beb2050022d27c31a900e985a63 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 3 Jan 2015 14:30:56 -0500 Subject: [PATCH] Add some additional tests for autoLink. Refs #5544 --- lib/Cake/Test/Case/View/Helper/TextHelperTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php index 63cd79494b8..41ef4b29649 100644 --- a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php @@ -161,6 +161,16 @@ public function testAutoLink() { $expected = 'This is a test text with URL [http://www.example.com?aParam[]=value1&aParam[]=value2&aParam[]=value3] in square brackets'; $result = $this->Text->autoLink($text); $this->assertEquals($expected, $result); + + $text = 'This is a test text with URL ;http://www.cakephp.org/page/4; semi-colon'; + $expected = 'This is a test text with URL ;http://www.cakephp.org/page/4; semi-colon'; + $result = $this->Text->autoLink($text); + $this->assertEquals($expected, $result); + + $text = 'This is a test text with URL (http://www.cakephp.org/page/4/other(thing)) brackets'; + $expected = 'This is a test text with URL (http://www.cakephp.org/page/4/other(thing)) brackets'; + $result = $this->Text->autoLink($text); + $this->assertEquals($expected, $result); } /**