Skip to content

Commit 871f065

Browse files
committed
Fix tests for PHPUnit 12
1 parent c1f2b31 commit 871f065

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

tests/Net/URL2Test.php

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -827,28 +827,28 @@ public static function provideEquivalentUrlLists()
827827
{
828828
return array(
829829
// String equivalence:
830-
array('http://example.com/', 'http://example.com/'),
830+
array(array('http://example.com/', 'http://example.com/')),
831831

832832
// Originally first dataset:
833-
array('http://www.example.com/%9a', 'http://www.example.com/%9A'),
833+
array(array('http://www.example.com/%9a', 'http://www.example.com/%9A')),
834834

835835
// Example from RFC 3986 6.2.2.:
836-
array('example://a/b/c/%7Bfoo%7D', 'eXAMPLE://a/./b/../b/%63/%7bfoo%7d'),
836+
array(array('example://a/b/c/%7Bfoo%7D', 'eXAMPLE://a/./b/../b/%63/%7bfoo%7d')),
837837

838838
// Example from RFC 3986 6.2.2.1.:
839-
array('HTTP://www.EXAMPLE.com/', 'http://www.example.com/'),
839+
array(array('HTTP://www.EXAMPLE.com/', 'http://www.example.com/')),
840840

841841
// Example from RFC 3986 6.2.3.:
842-
array(
842+
array(array(
843843
'http://example.com', 'http://example.com/',
844844
'http://example.com:/', 'http://example.com:80/'
845-
),
845+
)),
846846

847847
// Bug #20161: URLs with "0" as host fail to normalize with empty path
848-
array('http://0/', 'http://0'),
848+
array(array('http://0/', 'http://0')),
849849

850850
// Bug #20473: Normalize query and fragment broken
851-
array('foo:///?%66%6f%6f#%62%61%72', 'foo:///?foo#bar'),
851+
array(array('foo:///?%66%6f%6f#%62%61%72', 'foo:///?foo#bar')),
852852
);
853853
}
854854

@@ -861,10 +861,8 @@ public static function provideEquivalentUrlLists()
861861
* @dataProvider provideEquivalentUrlLists
862862
*/
863863
#[PHPUnit\Framework\Attributes\DataProvider('provideEquivalentUrlLists')]
864-
public function testNormalize()
864+
public function testNormalize(array $urls)
865865
{
866-
$urls = func_get_args();
867-
868866
$this->assertGreaterThanOrEqual(2, count($urls));
869867

870868
$last = null;
@@ -952,9 +950,8 @@ public function testComponentRecompositionAndNormalization($uri)
952950
* @return void
953951
*/
954952
#[PHPUnit\Framework\Attributes\DataProvider('provideEquivalentUrlLists')]
955-
public function testConstructSelf()
953+
public function testConstructSelf(array $urls)
956954
{
957-
$urls = func_get_args();
958955
foreach ($urls as $url) {
959956
$urlA = new Net_URL2($url);
960957
$urlB = new Net_URL2($urlA);

0 commit comments

Comments
 (0)