X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fsite%2FSiteTest.php;h=ac5f956e7a5519599bc232e77622ebf5552e2e38;hp=63d90d2e926c602a58d9b5194a8bd7d8515ada1d;hb=faf7cc4a09848c538320bd2b9067b1a77c0a0183;hpb=f873b499650ef5d27570f9cb96d01d1477f9e089 diff --git a/tests/phpunit/includes/site/SiteTest.php b/tests/phpunit/includes/site/SiteTest.php index 63d90d2e92..ac5f956e7a 100644 --- a/tests/phpunit/includes/site/SiteTest.php +++ b/tests/phpunit/includes/site/SiteTest.php @@ -228,28 +228,28 @@ class SiteTest extends MediaWikiTestCase { } public static function provideGetPageUrl() { - //NOTE: the assumption that the URL is built by replacing $1 + // NOTE: the assumption that the URL is built by replacing $1 // with the urlencoded version of $page // is true for Site but not guaranteed for subclasses. // Subclasses need to override this provider appropriately. - return array( - array( #0 + return [ + [ # 0 'http://acme.test/TestPath/$1', 'Foo', '/TestPath/Foo', - ), - array( #1 + ], + [ # 1 'http://acme.test/TestScript?x=$1&y=bla', 'Foo', 'TestScript?x=Foo&y=bla', - ), - array( #2 + ], + [ # 2 'http://acme.test/TestPath/$1', 'foo & bar/xyzzy (quux-shmoox?)', '/TestPath/foo%20%26%20bar%2Fxyzzy%20%28quux-shmoox%3F%29', - ), - ); + ], + ]; } /** @@ -259,7 +259,7 @@ class SiteTest extends MediaWikiTestCase { public function testGetPageUrl( $path, $page, $expected ) { $site = new Site(); - //NOTE: the assumption that getPageUrl is based on getLinkPath + // NOTE: the assumption that getPageUrl is based on getLinkPath // is true for Site but not guaranteed for subclasses. // Subclasses need to override this test case appropriately. $site->setLinkPath( $path ); @@ -283,12 +283,12 @@ class SiteTest extends MediaWikiTestCase { * @covers Site::unserialize */ public function testSerialization( Site $site ) { - $this->assertInstanceOf( 'Serializable', $site ); + $this->assertInstanceOf( Serializable::class, $site ); $serialization = serialize( $site ); $newInstance = unserialize( $serialization ); - $this->assertInstanceOf( 'Site', $newInstance ); + $this->assertInstanceOf( Site::class, $newInstance ); $this->assertEquals( $serialization, serialize( $newInstance ) ); }