Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding tests for TextHelper::autolinkurl(). Closes #1466

  • Loading branch information...
commit ab337e2e8a3ad7f2291f5db6cc4cedd6a9cfdb9c 1 parent 6071788
@markstory markstory authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 cake/tests/cases/libs/view/helpers/text.test.php
View
10 cake/tests/cases/libs/view/helpers/text.test.php
@@ -280,6 +280,16 @@ function testAutoLinkUrls() {
$expected = 'Text with a url <a href="http://www.cot.ag/cuIb2Q">www.cot.ag/cuIb2Q</a> 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 <a href="http://www.does--not--work.com">http://www.does--not--work.com</a> 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 <a href="http://www.not--work.com">http://www.not--work.com</a> and more';
+ $result = $this->Text->autoLinkUrls($text);
+ $this->assertEqual($expected, $result);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.