X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FTitlePermissionTest.php;h=11b9c012f8f211b3187458456b3c859cf89251a2;hb=ac0ab2c03a12756b0965f250c174e228348ec459;hp=5aa24e597d90dace55ca23f00b63deff73aab2b9;hpb=d69b967481649acbf8fa3d4e60df821bd24fda01;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/TitlePermissionTest.php b/tests/phpunit/includes/TitlePermissionTest.php index 5aa24e597d..11b9c012f8 100644 --- a/tests/phpunit/includes/TitlePermissionTest.php +++ b/tests/phpunit/includes/TitlePermissionTest.php @@ -969,5 +969,22 @@ class TitlePermissionTest extends MediaWikiLangTestCase { 'Useruser', 'test', '23:00, 31 December 1969', '127.0.8.1', $wgLang->timeanddate( wfTimestamp( TS_MW, $now ), true ) ] ], $this->title->getUserPermissionsErrors( 'move-target', $this->user ) ); + + // partial block message test + $this->user->mBlockedby = $this->user->getName(); + $this->user->mBlock = new Block( [ + 'address' => '127.0.8.1', + 'by' => $this->user->getId(), + 'reason' => 'no reason given', + 'timestamp' => $now, + 'sitewide' => false, + 'expiry' => 10, + ] ); + + $this->assertEquals( [ [ 'blockedtext-partial', + '[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1', + 'Useruser', null, '23:00, 31 December 1969', '127.0.8.1', + $wgLang->timeanddate( wfTimestamp( TS_MW, $now ), true ) ] ], + $this->title->getUserPermissionsErrors( 'move-target', $this->user ) ); } }