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
rdbms: make connection counting logic in LoadBalancer less stateful
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
TitlePermissionTest.php
diff --git
a/tests/phpunit/includes/TitlePermissionTest.php
b/tests/phpunit/includes/TitlePermissionTest.php
index
e5e265f
..
e09546e
100644
(file)
--- a/
tests/phpunit/includes/TitlePermissionTest.php
+++ b/
tests/phpunit/includes/TitlePermissionTest.php
@@
-1,6
+1,8
@@
<?php
<?php
+use MediaWiki\Block\DatabaseBlock;
use MediaWiki\Block\Restriction\PageRestriction;
use MediaWiki\Block\Restriction\PageRestriction;
+use MediaWiki\Block\SystemBlock;
use MediaWiki\MediaWikiServices;
/**
use MediaWiki\MediaWikiServices;
/**
@@
-919,7
+921,7
@@
class TitlePermissionTest extends MediaWikiLangTestCase {
$prev = time();
$now = time() + 120;
$this->user->mBlockedby = $this->user->getId();
$prev = time();
$now = time() + 120;
$this->user->mBlockedby = $this->user->getId();
- $this->user->mBlock = new Block( [
+ $this->user->mBlock = new
Database
Block( [
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',
@@
-942,7
+944,7
@@
class TitlePermissionTest extends MediaWikiLangTestCase {
global $wgLocalTZoffset;
$wgLocalTZoffset = -60;
$this->user->mBlockedby = $this->user->getName();
global $wgLocalTZoffset;
$wgLocalTZoffset = -60;
$this->user->mBlockedby = $this->user->getName();
- $this->user->mBlock = new Block( [
+ $this->user->mBlock = new
Database
Block( [
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',
@@
-960,19
+962,17
@@
class TitlePermissionTest extends MediaWikiLangTestCase {
# $user->mBlock->mExpiry == 'infinity'
$this->user->mBlockedby = $this->user->getName();
# $user->mBlock->mExpiry == 'infinity'
$this->user->mBlockedby = $this->user->getName();
- $this->user->mBlock = new Block( [
+ $this->user->mBlock = new
System
Block( [
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',
'timestamp' => $now,
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',
'timestamp' => $now,
- 'auto' => false,
- 'expiry' => 10,
'systemBlock' => 'test',
] );
$errors = [ [ 'systemblockedtext',
'[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1',
'systemBlock' => 'test',
] );
$errors = [ [ 'systemblockedtext',
'[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1',
- 'Useruser', 'test', '
23:00, 31 December 1969
', '127.0.8.1',
+ 'Useruser', 'test', '
infinite
', '127.0.8.1',
$wgLang->timeanddate( wfTimestamp( TS_MW, $now ), true ) ] ];
$this->assertEquals( $errors,
$wgLang->timeanddate( wfTimestamp( TS_MW, $now ), true ) ] ];
$this->assertEquals( $errors,
@@
-990,7
+990,7
@@
class TitlePermissionTest extends MediaWikiLangTestCase {
// partial block message test
$this->user->mBlockedby = $this->user->getName();
// partial block message test
$this->user->mBlockedby = $this->user->getName();
- $this->user->mBlock = new Block( [
+ $this->user->mBlock = new
Database
Block( [
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',
@@
-1074,7
+1074,7
@@
class TitlePermissionTest extends MediaWikiLangTestCase {
$now = time();
$this->user->mBlockedby = $this->user->getName();
$now = time();
$this->user->mBlockedby = $this->user->getName();
- $this->user->mBlock = new Block( [
+ $this->user->mBlock = new
Database
Block( [
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',
'address' => '127.0.8.1',
'by' => $this->user->getId(),
'reason' => 'no reason given',