Adding $this->tablesUsed to RevisionStorageTest.
authordaniel <daniel.kinzler@wikimedia.de>
Wed, 2 May 2012 17:34:35 +0000 (19:34 +0200)
committerAntoine Musso <hashar@free.fr>
Mon, 7 May 2012 21:46:25 +0000 (14:46 -0700)
This is a follow-up to I6934d03e (no 6414).

Declare tables in $this->tablesUsed to allow for database clenaup,
as Aaron suggested.

Change-Id: Iac05b0428b335879729f6d3b993eac0d3151429c

tests/phpunit/includes/RevisionStorageTest.php

index e1ecaec..20199b2 100644 (file)
@@ -6,10 +6,31 @@
  * @group Database
  * ^--- important, causes temporary tables to be used instead of the real database
  */
-class RevisionStorageTest extends PHPUnit_Framework_TestCase {
+class RevisionStorageTest extends MediaWikiTestCase {
 
        var $the_page;
 
+       function  __construct( $name = null, array $data = array(), $dataName = '' ) {
+               parent::__construct( $name, $data, $dataName );
+
+               $this->tablesUsed = array_merge( $this->tablesUsed,
+                                                array( 'page',
+                                                     'revision',
+                                                     'text',
+
+                                                     'recentchanges',
+                                                     'logging',
+
+                                                     'page_props',
+                                                     'pagelinks',
+                                                     'categorylinks',
+                                                     'langlinks',
+                                                     'externallinks',
+                                                     'imagelinks',
+                                                     'templatelinks',
+                                                     'iwlinks' ) );
+       }
+
        public function setUp() {
                if ( !$this->the_page ) {
                        $this->the_page = $this->createPage( 'RevisionStorageTest_the_page', "just a dummy page" );
@@ -285,4 +306,3 @@ class RevisionStorageTest extends PHPUnit_Framework_TestCase {
                $this->assertEquals( 'some testing text', $rev->getText() );
        }
 }
-?>