mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Adding tests for TextHelper::autolinkurl(). Closes #1466
This commit is contained in:
parent
6071788478
commit
ab337e2e8a
1 changed files with 10 additions and 0 deletions
|
@ -280,6 +280,16 @@ class TextHelperTest extends CakeTestCase {
|
|||
$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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue