X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FLinkUtilsTest.php;h=5407159a04c37ed9908aa7fcb063c576b4fd8475;hb=1004742f09b55ff781c13745781b9a7e90986faa;hp=7fbd59b0b80489d7b9e3521664e8aeb7d204b19d;hpb=d449f79a0d7ca808b891baf73b9e25ce7f7e48fe;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/LinkUtilsTest.php b/tests/LinkUtilsTest.php index 7fbd59b0..5407159a 100644 --- a/tests/LinkUtilsTest.php +++ b/tests/LinkUtilsTest.php @@ -83,7 +83,9 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase 'Date: Sat, 28 Oct 2017 12:01:33 GMT', 'Content-Type: text/html; charset=utf-8', 'Status: 200 OK', - 'end' => 'th=device-width">Refactoring · GitHub' + .'Refactoring · GitHub' + .'Refactoring · GitHub' + .'Refactoring · GitHub' + .'', - 'end' => 'th=device-width">Refactoring · GitHub' + .'Refactoring · GitHub' + .'http://hello.there/is=someone#here otherstuff'; + $expectedText = 'stuff ' + .'http://hello.there/is=someone#here otherstuff'; $processedText = text2clickable($text, ''); $this->assertEquals($expectedText, $processedText); $text = 'stuff http://hello.there/is=someone#here(please) otherstuff'; - $expectedText = 'stuff http://hello.there/is=someone#here(please) otherstuff'; + $expectedText = 'stuff ' + .'http://hello.there/is=someone#here(please) otherstuff'; $processedText = text2clickable($text, ''); $this->assertEquals($expectedText, $processedText); $text = 'stuff http://hello.there/is=someone#here(please)&no otherstuff'; - $expectedText = 'stuff http://hello.there/is=someone#here(please)&no otherstuff'; + $expectedText = 'stuff ' + .'http://hello.there/is=someone#here(please)&no otherstuff'; $processedText = text2clickable($text, ''); $this->assertEquals($expectedText, $processedText); } /** - * Test text2clickable a redirector set. + * Test text2clickable with a redirector set. */ public function testText2clickableWithRedirector() { @@ -410,4 +419,3 @@ function ut_curl_getinfo_rs_ct_ko($ch, $type) return 'text/plain'; } } -