diff options
Diffstat (limited to 'tests/phpunit/includes/api/ApiUnblockTest.php')
-rw-r--r-- | tests/phpunit/includes/api/ApiUnblockTest.php | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/phpunit/includes/api/ApiUnblockTest.php b/tests/phpunit/includes/api/ApiUnblockTest.php index 8ee41197101d..ffec687600a7 100644 --- a/tests/phpunit/includes/api/ApiUnblockTest.php +++ b/tests/phpunit/includes/api/ApiUnblockTest.php @@ -123,17 +123,13 @@ class ApiUnblockTest extends ApiTestCase { $this->doUnblock( [ 'tags' => 'custom tag' ] ); $dbw = wfGetDB( DB_PRIMARY ); - $this->assertSame( 1, (int)$dbw->selectField( - [ 'change_tag', 'logging', 'change_tag_def' ], - 'COUNT(*)', - [ 'log_type' => 'block', 'ctd_name' => 'custom tag' ], - __METHOD__, - [], - [ - 'change_tag' => [ 'JOIN', 'ct_log_id = log_id' ], - 'change_tag_def' => [ 'JOIN', 'ctd_id = ct_tag_id' ], - ] - ) ); + $this->assertSame( 1, (int)$dbw->newSelectQueryBuilder() + ->select( 'COUNT(*)' ) + ->from( 'logging' ) + ->join( 'change_tag', null, 'ct_log_id = log_id' ) + ->join( 'change_tag_def', null, 'ctd_id = ct_tag_id' ) + ->where( [ 'log_type' => 'block', 'ctd_name' => 'custom tag' ] ) + ->caller( __METHOD__ )->fetchField() ); } public function testUnblockWithProhibitedTag() { |