X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiMoveTest.php;h=3fa85394c14a21ee3896fd47bee00024ff5010f7;hb=09eee138e1d725a599fc5953eb1d88173c643701;hp=fb697ffd6adc6c2c4a316d413038c5e67cf8bb78;hpb=15f6eff90c305d405fe4331c8a8dc8caa842e5b3;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/ApiMoveTest.php b/tests/phpunit/includes/api/ApiMoveTest.php index fb697ffd6a..3fa85394c1 100644 --- a/tests/phpunit/includes/api/ApiMoveTest.php +++ b/tests/phpunit/includes/api/ApiMoveTest.php @@ -133,8 +133,6 @@ class ApiMoveTest extends ApiTestCase { // @todo File moving public function testPingLimiter() { - global $wgRateLimits; - $this->setExpectedException( ApiUsageException::class, "You've exceeded your rate limit. Please wait some time and try again." ); @@ -142,8 +140,8 @@ class ApiMoveTest extends ApiTestCase { $this->setMwGlobals( 'wgMainCacheType', 'hash' ); - $this->stashMwGlobals( 'wgRateLimits' ); - $wgRateLimits['move'] = [ '&can-bypass' => false, 'user' => [ 1, 60 ] ]; + $this->mergeMwGlobalArrayValue( 'wgRateLimits', + [ 'move' => [ '&can-bypass' => false, 'user' => [ 1, 60 ] ] ] ); $id = $this->createPage( $name ); @@ -257,12 +255,9 @@ class ApiMoveTest extends ApiTestCase { } public function testMoveSubpages() { - global $wgNamespacesWithSubpages; - $name = ucfirst( __FUNCTION__ ); - $this->stashMwGlobals( 'wgNamespacesWithSubpages' ); - $wgNamespacesWithSubpages[NS_MAIN] = true; + $this->mergeMwGlobalArrayValue( 'wgNamespacesWithSubpages', [ NS_MAIN => true ] ); $pages = [ $name, "$name/1", "$name/2", "Talk:$name", "Talk:$name/1", "Talk:$name/3" ]; $ids = [];