X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FLinkUtilsTest.php;h=99679320ae3ea696762abea4d127ac6b8e5dde84;hb=8e9fc6f6e6afc052a2c3b2d459764cc9ab20420a;hp=c77922ecea0c2a13dcbd8ff59e961925775956cb;hpb=601faf97516a836e4ae57dc4cecb9225c0a04338;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. */