$this->assertTrue( !is_null( $block ), 'Block is valid' );
$this->assertSame( $this->mUser->getName(), (string)$block->getTarget() );
- $this->assertSame( 'Some reason', $block->mReason );
+ $this->assertSame( 'Some reason', $block->getReason() );
return $ret;
}
__METHOD__,
[],
[
- 'change_tag' => [ 'INNER JOIN', 'ct_log_id = log_id' ],
- 'change_tag_def' => [ 'INNER JOIN', 'ctd_id = ct_tag_id' ],
+ 'change_tag' => [ 'JOIN', 'ct_log_id = log_id' ],
+ 'change_tag_def' => [ 'JOIN', 'ctd_id = ct_tag_id' ],
]
) );
}
}
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." );