Merge "Drop $wgChangeTagsSchemaMigrationStage"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiDeleteTest.php
index 0f2bcc6..fc546ff 100644 (file)
  * @covers ApiDelete
  */
 class ApiDeleteTest extends ApiTestCase {
+
+       protected function setUp() {
+               parent::setUp();
+               $this->tablesUsed = array_merge(
+                       $this->tablesUsed,
+                       [ 'change_tag', 'change_tag_def', 'logging' ]
+               );
+       }
+
        public function testDelete() {
                $name = 'Help:' . ucfirst( __FUNCTION__ );
 
@@ -81,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' ]
+                       ]
                ) );
        }