X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Futils%2FMWRestrictionsTest.php;h=abdfbb1459805edce95dfefe4cc6b48155b22952;hp=f2ea489b9f35ee713c86c6f6b716bdfaac0be26e;hb=63d96c15fde8d4d2842aa50c5ed2ce594aa0c674;hpb=d42754e47722436ef52218f21a8e544a05ee9ad7 diff --git a/tests/phpunit/includes/utils/MWRestrictionsTest.php b/tests/phpunit/includes/utils/MWRestrictionsTest.php index f2ea489b9f..abdfbb1459 100644 --- a/tests/phpunit/includes/utils/MWRestrictionsTest.php +++ b/tests/phpunit/includes/utils/MWRestrictionsTest.php @@ -1,5 +1,7 @@ assertInstanceOf( 'MWRestrictions', $ret ); + $this->assertInstanceOf( MWRestrictions::class, $ret ); $this->assertSame( '{"IPAddresses":["0.0.0.0/0","::/0"]}', $ret->toJson() @@ -39,7 +41,7 @@ class MWRestrictionsTest extends PHPUnit_Framework_TestCase { public function testArray( $data, $expect ) { if ( $expect === true ) { $ret = MWRestrictions::newFromArray( $data ); - $this->assertInstanceOf( 'MWRestrictions', $ret ); + $this->assertInstanceOf( MWRestrictions::class, $ret ); $this->assertSame( $data, $ret->toArray() ); } else { try { @@ -87,7 +89,7 @@ class MWRestrictionsTest extends PHPUnit_Framework_TestCase { public function testJson( $json, $expect ) { if ( is_array( $expect ) ) { $ret = MWRestrictions::newFromJson( $json ); - $this->assertInstanceOf( 'MWRestrictions', $ret ); + $this->assertInstanceOf( MWRestrictions::class, $ret ); $this->assertSame( $expect, $ret->toArray() ); $this->assertSame( $json, $ret->toJson( false ) ); @@ -178,7 +180,7 @@ class MWRestrictionsTest extends PHPUnit_Framework_TestCase { public function provideCheck() { $ret = []; - $mockBuilder = $this->getMockBuilder( 'FauxRequest' ) + $mockBuilder = $this->getMockBuilder( FauxRequest::class ) ->setMethods( [ 'getIP' ] ); foreach ( self::provideCheckIP() as $checkIP ) {