Merge "Don't pass Config to Parser(Factory)"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiBlockTest.php
index 7274a54..1c53147 100644 (file)
@@ -175,6 +175,12 @@ class ApiBlockTest extends ApiTestCase {
        }
 
        public function testBlockWithEmailBlock() {
+               $this->setMwGlobals( [
+                       'wgEnableEmail' => true,
+                       'wgEnableUserEmail' => true,
+                       'wgSysopEmailBans' => true,
+               ] );
+
                $res = $this->doBlock( [ 'noemail' => '' ] );
 
                $dbw = wfGetDB( DB_MASTER );
@@ -187,6 +193,12 @@ class ApiBlockTest extends ApiTestCase {
        }
 
        public function testBlockWithProhibitedEmailBlock() {
+               $this->setMwGlobals( [
+                       'wgEnableEmail' => true,
+                       'wgEnableUserEmail' => true,
+                       'wgSysopEmailBans' => true,
+               ] );
+
                $this->setExpectedException( ApiUsageException::class,
                        "You don't have permission to block users from sending email through the wiki." );