diff --git a/tests/integration/UrlLinkerEscapingHtmlTest.php b/tests/integration/UrlLinkerEscapingHtmlTest.php index 29a39e4..43ddd15 100644 --- a/tests/integration/UrlLinkerEscapingHtmlTest.php +++ b/tests/integration/UrlLinkerEscapingHtmlTest.php @@ -125,4 +125,39 @@ public function testUrlsGetLinkedInText($text, $expectedLinked, $message = null) 'Html around: '.$message ); } + + /** + * @dataProvider provideTextsWithHtml + * + * @param string $text + * @param string $expectedLinked + * @param string|null $message + */ + public function testHtmlInText($text, $expectedLinked, $message = null) + { + $this->urlLinker->setAllowUpperCaseUrlSchemes(true); + + $this->testUrlsGetLinkedInText($text, $expectedLinked); + } + + /** + * provide html in text + */ + public function provideTextsWithHtml() + { + return array( + array( + 'http://example.com?a=b&c=d', + $this->link('http://example.com?a=b&c=d', 'example.com'), + ), + array( + 'http://example.com?a=b&%3bc=d', + $this->link('http://example.com?a=b&amp%3bc=d', 'example.com'), + ), + array( + 'http://example.com?a=b&c=d', + $this->link('http://example.com?a=b&c=d', 'example.com'), + ), + ); + } }