<?php
+use MediaWiki\Block\DatabaseBlock;
use MediaWiki\Block\Restriction\PageRestriction;
use MediaWiki\Block\Restriction\NamespaceRestriction;
use MediaWiki\MediaWikiServices;
$target = '127.0.0.1';
// Test Partial Blocks Blocks.
- $block = new Block( [
+ $block = new DatabaseBlock( [
'address' => $target,
'by' => $this->getTestSysop()->getUser()->getId(),
'reason' => 'Parce que',
$restriction = $restrictions[0];
$this->assertEquals( $page->getId(), $restriction->getValue() );
$this->assertEquals( $page->getId(), $restriction->getTitle()->getArticleID() );
- $this->assertEquals( $title->getDBKey(), $restriction->getTitle()->getDBKey() );
+ $this->assertEquals( $title->getDBkey(), $restriction->getTitle()->getDBkey() );
$this->assertEquals( $title->getNamespace(), $restriction->getTitle()->getNamespace() );
// Delete the block and the restrictions.