}
public function testBlockWithEmailBlock() {
+ $this->setMwGlobals( [
+ 'wgEnableEmail' => true,
+ 'wgEnableUserEmail' => true,
+ 'wgSysopEmailBans' => true,
+ ] );
+
$res = $this->doBlock( [ 'noemail' => '' ] );
$dbw = wfGetDB( DB_MASTER );
}
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." );