<?php
use MediaWiki\Block\Restriction\PageRestriction;
+use MediaWiki\Block\Restriction\NamespaceRestriction;
/**
* @group API
] );
$this->db->insert( 'ipblocks_restrictions', [
'ir_ipb_id' => $block->getId(),
- 'ir_type' => 2,
- 'ir_value' => 3,
+ 'ir_type' => NamespaceRestriction::TYPE_ID,
+ 'ir_value' => NS_USER_TALK,
+ ] );
+ $this->db->insert( 'ipblocks_restrictions', [
+ 'ir_ipb_id' => $block->getId(),
+ 'ir_type' => 3,
+ 'ir_value' => 4,
] );
// Test without requesting restrictions.
'title' => $title,
],
],
+ 'namespaces' => [
+ NS_USER_TALK,
+ ],
],
] );
$this->assertArraySubset( $restrictionsSubset, $data['query']['blocks'][0] );