Prevent special block test failures with certain configs
authorThalia <thalia.e.chan@googlemail.com>
Sat, 2 Feb 2019 04:47:58 +0000 (20:47 -0800)
committerUmherirrender <umherirrender_de.wp@web.de>
Sat, 2 Feb 2019 20:11:50 +0000 (20:11 +0000)
The checkbox for preventing a user from editing their own talk
page is only present for partial blocks if wgBlockAllowsUTEdit
is true, so set it to true for any tests that check for its
presence.

Change-Id: I0228f5787ad17130cbe015641c1142a7e52cef38

tests/phpunit/includes/specials/SpecialBlockTest.php

index 55a8b66..0643e0e 100644 (file)
@@ -29,6 +29,7 @@ class SpecialBlockTest extends SpecialPageTestBase {
        public function testGetFormFields() {
                $this->setMwGlobals( [
                        'wgEnablePartialBlocks' => false,
+                       'wgBlockAllowsUTEdit' => true,
                ] );
                $page = $this->newSpecialPage();
                $wrappedPage = TestingAccessWrapper::newFromObject( $page );
@@ -71,6 +72,7 @@ class SpecialBlockTest extends SpecialPageTestBase {
        public function testMaybeAlterFormDefaults() {
                $this->setMwGlobals( [
                        'wgEnablePartialBlocks' => false,
+                       'wgBlockAllowsUTEdit' => true,
                ] );
 
                $block = $this->insertBlock();