Don't reset name tables between test runs.
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiBlockTest.php
index 374ea3c..65adedc 100644 (file)
@@ -125,10 +125,10 @@ class ApiBlockTest extends ApiTestCase {
                $this->doBlock( [ 'tags' => 'custom tag' ] );
 
                $dbw = wfGetDB( DB_MASTER );
-               $this->assertSame( 'custom tag', $dbw->selectField(
+               $this->assertSame( 1, (int)$dbw->selectField(
                        [ 'change_tag', 'logging' ],
-                       'ct_tag',
-                       [ 'log_type' => 'block' ],
+                       'COUNT(*)',
+                       [ 'log_type' => 'block', 'ct_tag' => 'custom tag' ],
                        __METHOD__,
                        [],
                        [ 'change_tag' => [ 'INNER JOIN', 'ct_log_id = log_id' ] ]