|
|
@@ -241,6 +241,14 @@ class TextHelperTest extends CakeTestCase {
|
|
|
'Text with a url http://www.not--work.com and more',
|
|
|
'Text with a url <a href="http://www.not--work.com">http://www.not--work.com</a> and more',
|
|
|
),
|
|
|
+ array(
|
|
|
+ 'Text with a partial www.küchenschöhn-not-working.de URL',
|
|
|
+ 'Text with a partial <a href="http://www.küchenschöhn-not-working.de">www.küchenschöhn-not-working.de</a> URL'
|
|
|
+ ),
|
|
|
+ array(
|
|
|
+ 'Text with a partial http://www.küchenschöhn-not-working.de URL',
|
|
|
+ 'Text with a partial <a href="http://www.küchenschöhn-not-working.de">http://www.küchenschöhn-not-working.de</a> URL'
|
|
|
+ )
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -351,6 +359,16 @@ class TextHelperTest extends CakeTestCase {
|
|
|
$expected = 'Text with <a href="mailto:email@example.com" \s*class="link">email@example.com</a> address';
|
|
|
$result = $this->Text->autoLinkEmails($text, array('class' => 'link'));
|
|
|
$this->assertRegExp('#^' . $expected . '$#', $result);
|
|
|
+
|
|
|
+ $text = 'Text with düsentrieb@küchenschöhn-not-working.de address';
|
|
|
+ $expected = 'Text with <a href="mailto:düsentrieb@küchenschöhn-not-working.de">düsentrieb@küchenschöhn-not-working.de</a> address';
|
|
|
+ $result = $this->Text->autoLinkEmails($text);
|
|
|
+ $this->assertRegExp('#^' . $expected . '$#', $result);
|
|
|
+
|
|
|
+ $text = 'Text with me@subdomain.küchenschöhn.de address';
|
|
|
+ $expected = 'Text with <a href="mailto:me@subdomain.küchenschöhn.de">me@subdomain.küchenschöhn.de</a> address';
|
|
|
+ $result = $this->Text->autoLinkEmails($text);
|
|
|
+ $this->assertRegExp('#^' . $expected . '$#', $result);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -383,7 +401,7 @@ TEXT;
|
|
|
|
|
|
TEXT;
|
|
|
$result = $this->Text->autoParagraph($text);
|
|
|
- $this->assertEquals($expected, $result);
|
|
|
+ $this->assertTextEquals($expected, $result);
|
|
|
$result = $this->Text->autoParagraph($text);
|
|
|
$text = 'This is a <BR id="test"/><br class="test"> test text';
|
|
|
$expected = <<<TEXT
|
|
|
@@ -392,7 +410,7 @@ TEXT;
|
|
|
|
|
|
TEXT;
|
|
|
$result = $this->Text->autoParagraph($text);
|
|
|
- $this->assertEquals($expected, $result);
|
|
|
+ $this->assertTextEquals($expected, $result);
|
|
|
$text = <<<TEXT
|
|
|
This is a test text.
|
|
|
This is a line return.
|
|
|
@@ -403,7 +421,7 @@ This is a line return.</p>
|
|
|
|
|
|
TEXT;
|
|
|
$result = $this->Text->autoParagraph($text);
|
|
|
- $this->assertEquals($expected, $result);
|
|
|
+ $this->assertTextEquals($expected, $result);
|
|
|
$text = <<<TEXT
|
|
|
This is a test text.
|
|
|
|
|
|
@@ -415,7 +433,7 @@ TEXT;
|
|
|
|
|
|
TEXT;
|
|
|
$result = $this->Text->autoParagraph($text);
|
|
|
- $this->assertEquals($expected, $result);
|
|
|
+ $this->assertTextEquals($expected, $result);
|
|
|
}
|
|
|
|
|
|
}
|