dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
api
/
ApiQueryBlocksTest.php
diff --git
a/tests/phpunit/includes/api/ApiQueryBlocksTest.php
b/tests/phpunit/includes/api/ApiQueryBlocksTest.php
index
03198a8
..
e281679
100644
(file)
--- a/
tests/phpunit/includes/api/ApiQueryBlocksTest.php
+++ b/
tests/phpunit/includes/api/ApiQueryBlocksTest.php
@@
-1,5
+1,6
@@
<?php
<?php
+use MediaWiki\Block\DatabaseBlock;
use MediaWiki\Block\Restriction\PageRestriction;
use MediaWiki\Block\Restriction\NamespaceRestriction;
use MediaWiki\Block\Restriction\PageRestriction;
use MediaWiki\Block\Restriction\NamespaceRestriction;
@@
-29,7
+30,7
@@
class ApiQueryBlocksTest extends ApiTestCase {
$badActor = $this->getTestUser()->getUser();
$sysop = $this->getTestSysop()->getUser();
$badActor = $this->getTestUser()->getUser();
$sysop = $this->getTestSysop()->getUser();
- $block = new Block( [
+ $block = new
Database
Block( [
'address' => $badActor->getName(),
'user' => $badActor->getId(),
'by' => $sysop->getId(),
'address' => $badActor->getName(),
'user' => $badActor->getId(),
'by' => $sysop->getId(),
@@
-57,7
+58,7
@@
class ApiQueryBlocksTest extends ApiTestCase {
$badActor = $this->getTestUser()->getUser();
$sysop = $this->getTestSysop()->getUser();
$badActor = $this->getTestUser()->getUser();
$sysop = $this->getTestSysop()->getUser();
- $block = new Block( [
+ $block = new
Database
Block( [
'address' => $badActor->getName(),
'user' => $badActor->getId(),
'by' => $sysop->getId(),
'address' => $badActor->getName(),
'user' => $badActor->getId(),
'by' => $sysop->getId(),
@@
-87,7
+88,7
@@
class ApiQueryBlocksTest extends ApiTestCase {
$badActor = $this->getTestUser()->getUser();
$sysop = $this->getTestSysop()->getUser();
$badActor = $this->getTestUser()->getUser();
$sysop = $this->getTestSysop()->getUser();
- $block = new Block( [
+ $block = new
Database
Block( [
'address' => $badActor->getName(),
'user' => $badActor->getId(),
'by' => $sysop->getId(),
'address' => $badActor->getName(),
'user' => $badActor->getId(),
'by' => $sysop->getId(),
@@
-112,6
+113,12
@@
class ApiQueryBlocksTest extends ApiTestCase {
'ir_type' => PageRestriction::TYPE_ID,
'ir_value' => $pageId,
] );
'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,
$this->db->insert( 'ipblocks_restrictions', [
'ir_ipb_id' => $block->getId(),
'ir_type' => NamespaceRestriction::TYPE_ID,