diff --git a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php index 0c93e3085ae..c4e36aaa783 100644 --- a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php @@ -314,6 +314,16 @@ public function testAutoLinkUrlsOptions() { * @return void */ public function testAutoLinkUrlsEscape() { + $text = 'Text with a partial http://www.example.com link'; + $expected = 'Text with a partial http://www.example.com link'; + $result = $this->Text->autoLinkUrls($text, array('escape' => false)); + $this->assertEquals($expected, $result); + + $text = 'Text with a partial www.example.com link'; + $expected = 'Text with a partial www.example.com link'; + $result = $this->Text->autoLinkUrls($text, array('escape' => false)); + $this->assertEquals($expected, $result); + $text = 'Text with a partial link link'; $expected = 'Text with a partial link link'; $result = $this->Text->autoLinkUrls($text, array('escape' => false)); @@ -331,22 +341,22 @@ public function testAutoLinkUrlsEscape() { $text = 'Text with a url www.not-working-www.com and more'; $expected = 'Text with a url <a href="http://www.not-working-www.com">www.not-working-www.com</a> and more'; - $result = $this->Text->autoLinkUrls($text); + $result = $this->Text->autoLinkUrls($text, array('escape' => true)); $this->assertEquals($expected, $result); $text = 'Text with a url www.not-working-www.com and more'; $expected = 'Text with a url www.not-working-www.com and more'; - $result = $this->Text->autoLinkUrls($text); + $result = $this->Text->autoLinkUrls($text, array('escape' => false)); $this->assertEquals($expected, $result); $text = 'Text with a url http://www.not-working-www.com and more'; $expected = 'Text with a url http://www.not-working-www.com and more'; - $result = $this->Text->autoLinkUrls($text); + $result = $this->Text->autoLinkUrls($text, array('escape' => false)); $this->assertEquals($expected, $result); $text = 'Text with a url http://www.www.not-working-www.com and more'; $expected = 'Text with a url http://www.www.not-working-www.com and more'; - $result = $this->Text->autoLinkUrls($text); + $result = $this->Text->autoLinkUrls($text, array('escape' => false)); $this->assertEquals($expected, $result); }