From ab337e2e8a3ad7f2291f5db6cc4cedd6a9cfdb9c Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 18 Jan 2011 18:56:35 -0500 Subject: [PATCH] Adding tests for TextHelper::autolinkurl(). Closes #1466 --- cake/tests/cases/libs/view/helpers/text.test.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cake/tests/cases/libs/view/helpers/text.test.php b/cake/tests/cases/libs/view/helpers/text.test.php index 295d9ce3919..249f9674944 100644 --- a/cake/tests/cases/libs/view/helpers/text.test.php +++ b/cake/tests/cases/libs/view/helpers/text.test.php @@ -280,6 +280,16 @@ function testAutoLinkUrls() { $expected = 'Text with a url www.cot.ag/cuIb2Q and more'; $result = $this->Text->autoLinkUrls($text); $this->assertEqual($expected, $result); + + $text = 'Text with a url http://www.does--not--work.com and more'; + $expected = 'Text with a url http://www.does--not--work.com and more'; + $result = $this->Text->autoLinkUrls($text); + $this->assertEqual($expected, $result); + + $text = 'Text with a url http://www.not--work.com and more'; + $expected = 'Text with a url http://www.not--work.com and more'; + $result = $this->Text->autoLinkUrls($text); + $this->assertEqual($expected, $result); } /**