API: Migrate Title::userCan() calls to PermissionManager
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiUserrightsTest.php
index 8cc0217..a1bafed 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\Block\DatabaseBlock;
+
 /**
  * @group API
  * @group Database
@@ -128,7 +130,7 @@ class ApiUserrightsTest extends ApiTestCase {
        public function testBlockedWithUserrights() {
                global $wgUser;
 
-               $block = new Block( [ 'address' => $wgUser, 'by' => $wgUser->getId(), ] );
+               $block = new DatabaseBlock( [ 'address' => $wgUser, 'by' => $wgUser->getId(), ] );
                $block->insert();
 
                try {
@@ -144,7 +146,7 @@ class ApiUserrightsTest extends ApiTestCase {
 
                $this->setPermissions( true, true );
 
-               $block = new Block( [ 'address' => $user, 'by' => $user->getId() ] );
+               $block = new DatabaseBlock( [ 'address' => $user, 'by' => $user->getId() ] );
                $block->insert();
 
                try {
@@ -206,7 +208,7 @@ class ApiUserrightsTest extends ApiTestCase {
                                        'log_title' => strtr( $user->getName(), ' ', '_' )
                                ],
                                __METHOD__,
-                               [ 'change_tag_def' => [ 'INNER JOIN', 'ctd_id = ct_tag_id' ] ]
+                               [ 'change_tag_def' => [ 'JOIN', 'ctd_id = ct_tag_id' ] ]
                        )
                );
        }