From 9b98d16996a97b138f10e80c3533c6287b5097da Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 2 May 2012 19:34:35 +0200 Subject: [PATCH] Adding $this->tablesUsed to RevisionStorageTest. 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 --- .../phpunit/includes/RevisionStorageTest.php | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/includes/RevisionStorageTest.php b/tests/phpunit/includes/RevisionStorageTest.php index e1ecaec522..20199b203b 100644 --- a/tests/phpunit/includes/RevisionStorageTest.php +++ b/tests/phpunit/includes/RevisionStorageTest.php @@ -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() ); } } -?> -- 2.20.1