X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Futils%2FMWRestrictionsTest.php;h=c411e53319c4818cb0edaaf52065dd060709b091;hb=6b3e5511fb848890f174690885e748b90389c0b8;hp=4c0532627594b4a1d7923dbdcdceb9b1eb48b23f;hpb=dbad540cd37617879aff6f28ce9c016dd8049d4e;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/utils/MWRestrictionsTest.php b/tests/phpunit/includes/utils/MWRestrictionsTest.php index 4c05326275..c411e53319 100644 --- a/tests/phpunit/includes/utils/MWRestrictionsTest.php +++ b/tests/phpunit/includes/utils/MWRestrictionsTest.php @@ -21,7 +21,7 @@ class MWRestrictionsTest extends PHPUnit_Framework_TestCase { */ public function testNewDefault() { $ret = MWRestrictions::newDefault(); - $this->assertInstanceOf( 'MWRestrictions', $ret ); + $this->assertInstanceOf( MWRestrictions::class, $ret ); $this->assertSame( '{"IPAddresses":["0.0.0.0/0","::/0"]}', $ret->toJson() @@ -41,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 { @@ -89,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 ) ); @@ -180,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 ) {