From 210bc4248b5e0c8bd577ac51c2f8df9ac05166ae Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Tue, 25 Aug 2009 14:12:31 -0400 Subject: All tests pass except for those that require matching parens or brackets --- tests/URLDetectionTest.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tests/URLDetectionTest.php') diff --git a/tests/URLDetectionTest.php b/tests/URLDetectionTest.php index 05c02d6bb..7b2e8c5ae 100644 --- a/tests/URLDetectionTest.php +++ b/tests/URLDetectionTest.php @@ -25,16 +25,24 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase static public function provider() { return array( + array('http://127.0.0.1', + 'http://127.0.0.1'), array('127.0.0.1', '127.0.0.1'), + array('127.0.0.1:99', + '127.0.0.1:99'), array('127.0.0.1/test.php', '127.0.0.1/test.php'), + array('http://[::1]:99/test.php', + 'http://[::1]:99/test.php'), array('http://::1/test.php', 'http://::1/test.php'), array('http://::1', 'http://::1'), array('2001:4978:1b5:0:21d:e0ff:fe66:59ab/test.php', '2001:4978:1b5:0:21d:e0ff:fe66:59ab/test.php'), + array('[2001:4978:1b5:0:21d:e0ff:fe66:59ab]:99/test.php', + '[2001:4978:1b5:0:21d:e0ff:fe66:59ab]:99/test.php'), array('2001:4978:1b5:0:21d:e0ff:fe66:59ab', '2001:4978:1b5:0:21d:e0ff:fe66:59ab'), array('http://127.0.0.1', @@ -145,14 +153,13 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase '<http://example.com>'), array('http://example.com/path/(foo)/bar', 'http://example.com/path/(foo)/bar'), - //Not a valid url - urls cannot contain unencoded square brackets array('http://example.com/path/[foo]/bar', 'http://example.com/path/[foo]/bar'), array('http://example.com/path/foo/(bar)', 'http://example.com/path/foo/(bar)'), //Not a valid url - urls cannot contain unencoded square brackets - //array('http://example.com/path/foo/[bar]', - // 'http://example.com/path/foo/[bar]'), + array('http://example.com/path/foo/[bar]', + 'http://example.com/path/foo/[bar]'), array('Hey, check out my cool site http://example.com okay?', 'Hey, check out my cool site http://example.com okay?'), array('What about parens (e.g. http://example.com/path/foo/(bar))?', -- cgit v1.2.3-54-g00ecf