Merge "Set $wgMediaInTargetLanguage to true by default"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 21 Feb 2019 06:54:45 +0000 (06:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 21 Feb 2019 06:54:45 +0000 (06:54 +0000)
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/block/BlockRestrictionTest.php
tests/phpunit/includes/specials/SpecialBlockTest.php

index a151080..f20481b 100644 (file)
@@ -616,6 +616,9 @@ class BlockTest extends MediaWikiLangTestCase {
         * @covers Block::appliesToTitle
         */
        public function testAppliesToTitleReturnsTrueOnSitewideBlock() {
+               $this->setMwGlobals( [
+                       'wgBlockDisablesLogin' => false,
+               ] );
                $user = $this->getTestUser()->getUser();
                $block = new Block( [
                        'expiry' => wfTimestamp( TS_MW, wfTimestamp() + ( 40 * 60 * 60 ) ),
@@ -642,6 +645,9 @@ class BlockTest extends MediaWikiLangTestCase {
         * @covers Block::appliesToTitle
         */
        public function testAppliesToTitleOnPartialBlock() {
+               $this->setMwGlobals( [
+                       'wgBlockDisablesLogin' => false,
+               ] );
                $user = $this->getTestUser()->getUser();
                $block = new Block( [
                        'expiry' => wfTimestamp( TS_MW, wfTimestamp() + ( 40 * 60 * 60 ) ),
@@ -673,6 +679,9 @@ class BlockTest extends MediaWikiLangTestCase {
         * @covers Block::appliesToPage
         */
        public function testAppliesToReturnsTrueOnSitewideBlock() {
+               $this->setMwGlobals( [
+                       'wgBlockDisablesLogin' => false,
+               ] );
                $user = $this->getTestUser()->getUser();
                $block = new Block( [
                        'expiry' => wfTimestamp( TS_MW, wfTimestamp() + ( 40 * 60 * 60 ) ),
@@ -697,6 +706,9 @@ class BlockTest extends MediaWikiLangTestCase {
         * @covers Block::appliesToPage
         */
        public function testAppliesToPageOnPartialPageBlock() {
+               $this->setMwGlobals( [
+                       'wgBlockDisablesLogin' => false,
+               ] );
                $user = $this->getTestUser()->getUser();
                $block = new Block( [
                        'expiry' => wfTimestamp( TS_MW, wfTimestamp() + ( 40 * 60 * 60 ) ),
@@ -725,6 +737,9 @@ class BlockTest extends MediaWikiLangTestCase {
         * @covers Block::appliesToNamespace
         */
        public function testAppliesToNamespaceOnPartialNamespaceBlock() {
+               $this->setMwGlobals( [
+                       'wgBlockDisablesLogin' => false,
+               ] );
                $user = $this->getTestUser()->getUser();
                $block = new Block( [
                        'expiry' => wfTimestamp( TS_MW, wfTimestamp() + ( 40 * 60 * 60 ) ),
@@ -749,6 +764,9 @@ class BlockTest extends MediaWikiLangTestCase {
         * @covers Block::prevents
         */
        public function testBlockAllowsPurge() {
+               $this->setMwGlobals( [
+                       'wgBlockDisablesLogin' => false,
+               ] );
                $block = new Block();
                $this->assertFalse( $block->prevents( 'purge' ) );
        }
index 2d78018..5bbd3d0 100644 (file)
@@ -25,6 +25,9 @@ class BlockRestrictionTest extends \MediaWikiLangTestCase {
         * @covers ::rowToRestriction
         */
        public function testLoadMultipleRestrictions() {
+               $this->setMwGlobals( [
+                       'wgBlockDisablesLogin' => false,
+               ] );
                $block = $this->insertBlock();
 
                $pageFoo = $this->getExistingTestPage( 'Foo' );
index a17f39d..0b3adc0 100644 (file)
@@ -401,6 +401,9 @@ class SpecialBlockTest extends SpecialPageTestBase {
                $expectedResult,
                $reason
        ) {
+               $this->setMwGlobals( [
+                       'wgBlockDisablesLogin' => false,
+               ] );
                $this->setGroupPermissions( 'sysop', 'unblockself', true );
                $this->setGroupPermissions( 'user', 'block', true );
                // Getting errors about creating users in db in provider.