From 149d16d597b05792978f049a7c46bf0c72a2661c Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Thu, 1 Oct 2015 23:22:07 +0300 Subject: [PATCH] Make lines short to pass phpcs in WikiReferenceTest.php Bug: T102614 Change-Id: I557744a48a6a6889fde0b050d8e646ba081d5504 --- tests/phpunit/includes/WikiReferenceTest.php | 108 ++++++++++++++++--- 1 file changed, 96 insertions(+), 12 deletions(-) diff --git a/tests/phpunit/includes/WikiReferenceTest.php b/tests/phpunit/includes/WikiReferenceTest.php index 1d907ebfe3..308851abb4 100644 --- a/tests/phpunit/includes/WikiReferenceTest.php +++ b/tests/phpunit/includes/WikiReferenceTest.php @@ -31,12 +31,54 @@ class WikiReferenceTest extends PHPUnit_Framework_TestCase { public function provideGetCanonicalUrl() { return array( - 'no fragement' => array( 'https://acme.com/wiki/Foo', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', null ), - 'empty fragement' => array( 'https://acme.com/wiki/Foo', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', '' ), - 'fragment' => array( 'https://acme.com/wiki/Foo#Bar', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', 'Bar' ), - 'double fragment' => array( 'https://acme.com/wiki/Foo#Bar%23Xus', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', 'Bar#Xus' ), - 'escaped fragement' => array( 'https://acme.com/wiki/Foo%23Bar', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo#Bar', null ), - 'empty path' => array( 'https://acme.com/Foo', 'https://acme.com', '//acme.com', '/$1', 'Foo', null ), + 'no fragement' => array( + 'https://acme.com/wiki/Foo', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo', + null + ), + 'empty fragement' => array( + 'https://acme.com/wiki/Foo', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo', + '' + ), + 'fragment' => array( + 'https://acme.com/wiki/Foo#Bar', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo', + 'Bar' + ), + 'double fragment' => array( + 'https://acme.com/wiki/Foo#Bar%23Xus', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo', + 'Bar#Xus' + ), + 'escaped fragement' => array( + 'https://acme.com/wiki/Foo%23Bar', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo#Bar', + null + ), + 'empty path' => array( + 'https://acme.com/Foo', + 'https://acme.com', + '//acme.com', + '/$1', + 'Foo', + null + ), ); } @@ -59,12 +101,54 @@ class WikiReferenceTest extends PHPUnit_Framework_TestCase { public function provideGetFullUrl() { return array( - 'no fragement' => array( '//acme.com/wiki/Foo', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', null ), - 'empty fragement' => array( '//acme.com/wiki/Foo', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', '' ), - 'fragment' => array( '//acme.com/wiki/Foo#Bar', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', 'Bar' ), - 'double fragment' => array( '//acme.com/wiki/Foo#Bar%23Xus', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', 'Bar#Xus' ), - 'escaped fragement' => array( '//acme.com/wiki/Foo%23Bar', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo#Bar', null ), - 'empty path' => array( '//acme.com/Foo', 'https://acme.com', '//acme.com', '/$1', 'Foo', null ), + 'no fragement' => array( + '//acme.com/wiki/Foo', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo', + null + ), + 'empty fragement' => array( + '//acme.com/wiki/Foo', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo', + '' + ), + 'fragment' => array( + '//acme.com/wiki/Foo#Bar', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo', + 'Bar' + ), + 'double fragment' => array( + '//acme.com/wiki/Foo#Bar%23Xus', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo', + 'Bar#Xus' + ), + 'escaped fragement' => array( + '//acme.com/wiki/Foo%23Bar', + 'https://acme.com', + '//acme.com', + '/wiki/$1', + 'Foo#Bar', + null + ), + 'empty path' => array( + '//acme.com/Foo', + 'https://acme.com', + '//acme.com', + '/$1', + 'Foo', + null + ), ); } -- 2.20.1