Merge "Drop $wgChangeTagsSchemaMigrationStage"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiDeleteTest.php
index c9ce28e..fc546ff 100644 (file)
@@ -15,8 +15,10 @@ class ApiDeleteTest extends ApiTestCase {
 
        protected function setUp() {
                parent::setUp();
-
-               $this->doLogin();
+               $this->tablesUsed = array_merge(
+                       $this->tablesUsed,
+                       [ 'change_tag', 'change_tag_def', 'logging' ]
+               );
        }
 
        public function testDelete() {
@@ -88,15 +90,18 @@ class ApiDeleteTest extends ApiTestCase {
 
                $dbw = wfGetDB( DB_MASTER );
                $this->assertSame( 'custom tag', $dbw->selectField(
-                       [ 'change_tag', 'logging' ],
-                       'ct_tag',
+                       [ 'change_tag', 'logging', 'change_tag_def' ],
+                       'ctd_name',
                        [
                                'log_namespace' => NS_HELP,
                                'log_title' => ucfirst( __FUNCTION__ ),
                        ],
                        __METHOD__,
                        [],
-                       [ 'change_tag' => [ 'INNER JOIN', 'ct_log_id = log_id' ] ]
+                       [
+                               'change_tag' => [ 'INNER JOIN', 'ct_log_id = log_id' ],
+                               'change_tag_def' => [ 'INNER JOIN', 'ctd_id = ct_tag_id' ]
+                       ]
                ) );
        }