X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FLinkUtilsTest.php;h=99679320ae3ea696762abea4d127ac6b8e5dde84;hb=d9514becc4d8b06e2a31c6975f3bbbaf6f1fed42;hp=c77922ecea0c2a13dcbd8ff59e961925775956cb;hpb=be9ddff2fb8706ce575e95e8cd64458411895dbe;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/LinkUtilsTest.php b/tests/LinkUtilsTest.php index c77922ec..99679320 100644 --- a/tests/LinkUtilsTest.php +++ b/tests/LinkUtilsTest.php @@ -130,6 +130,21 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase $this->assertEquals($expectedText, $processedText); } + /** + * Test text2clickable a redirector set and without URL encode. + */ + public function testText2clickableWithRedirectorDontEncode() + { + $text = 'stuff http://hello.there/?is=someone&or=something#here otherstuff'; + $redirector = 'http://redirector.to'; + $expectedText = 'stuff http://hello.there/?is=someone&or=something#here otherstuff'; + $processedText = text2clickable($text, $redirector, false); + $this->assertEquals($expectedText, $processedText); + } + /** * Test testSpace2nbsp. */