Skip to content
Permalink
Browse files

Add a test for src and href attributes

with TextHelper::autoLinkUrls()
  • Loading branch information...
markstory committed Oct 10, 2011
1 parent c43ba3f commit 3b1a11e2d2d0a3d432db0171205e7d0d2b1553c1
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/Cake/Test/Case/View/Helper/TextHelperTest.php
@@ -275,6 +275,16 @@ public function testAutoLinkUrls() {
$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);
$text = 'Text with a partial <a href="http://www.cakephp.org">link</a> link';
$expected = 'Text with a partial <a href="http://www.cakephp.org">link</a> link';
$result = $this->Text->autoLinkUrls($text, array('escape' => false));
$this->assertEqual($expected, $result);
$text = 'Text with a partial <iframe src="http://www.cakephp.org" /> link';
$expected = 'Text with a partial <iframe src="http://www.cakephp.org" /> link';
$result = $this->Text->autoLinkUrls($text, array('escape' => false));
$this->assertEqual($expected, $result);
}
/**

0 comments on commit 3b1a11e

Please sign in to comment.
You can’t perform that action at this time.