From: Brion Vibber Date: Fri, 23 Oct 2009 20:50:39 +0000 (-0700) Subject: Fix an incorrectly passing URL test case and add two a related test case: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ff4f9d8c7d6d1d5c4a69d75924e4da67a883db44;p=quix0rs-gnu-social.git Fix an incorrectly passing URL test case and add two a related test case: URLs with paths followed by a double-quote character are incorrectly including the quote in the URL. The double-quote character is in fact not a legal URL char and must be URL-escaped; more importantly it just causes oddities when you quote a message ending in a URL -- such as when using the redent-button experimental feature. --- diff --git a/tests/URLDetectionTest.php b/tests/URLDetectionTest.php index 45203bf6e3..0cc03ccce7 100644 --- a/tests/URLDetectionTest.php +++ b/tests/URLDetectionTest.php @@ -47,7 +47,9 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase array('127.0.0.1/\'test', '127.0.0.1/\'test'), array('127.0.0.1/"test', - '127.0.0.1/"test'), + '127.0.0.1/"test'), + array('127.0.0.1/test"test', + '127.0.0.1/test"test'), array('127.0.0.1/-test', '127.0.0.1/-test'), array('127.0.0.1/_test', @@ -170,6 +172,8 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase '\'http://example.com\''), array('"http://example.com"', '"http://example.com"'), + array('"http://example.com/"', + '"http://example.com/"'), array('http://example.com', 'http://example.com'), array('(http://example.com)',