<?php
+use MediaWiki\Block\DatabaseBlock;
use MediaWiki\Block\Restriction\PageRestriction;
use MediaWiki\Block\Restriction\NamespaceRestriction;
$badActor = $this->getTestUser()->getUser();
$sysop = $this->getTestSysop()->getUser();
- $block = new Block( [
+ $block = new DatabaseBlock( [
'address' => $badActor->getName(),
'user' => $badActor->getId(),
'by' => $sysop->getId(),
$badActor = $this->getTestUser()->getUser();
$sysop = $this->getTestSysop()->getUser();
- $block = new Block( [
+ $block = new DatabaseBlock( [
'address' => $badActor->getName(),
'user' => $badActor->getId(),
'by' => $sysop->getId(),
$badActor = $this->getTestUser()->getUser();
$sysop = $this->getTestSysop()->getUser();
- $block = new Block( [
+ $block = new DatabaseBlock( [
'address' => $badActor->getName(),
'user' => $badActor->getId(),
'by' => $sysop->getId(),
'ir_type' => PageRestriction::TYPE_ID,
'ir_value' => $pageId,
] );
+ // Page that has been deleted.
+ $this->db->insert( 'ipblocks_restrictions', [
+ 'ir_ipb_id' => $block->getId(),
+ 'ir_type' => PageRestriction::TYPE_ID,
+ 'ir_value' => 999999,
+ ] );
$this->db->insert( 'ipblocks_restrictions', [
'ir_ipb_id' => $block->getId(),
'ir_type' => NamespaceRestriction::TYPE_ID,