Index: trunk/phase3/tests/phpunit/bootstrap.php |
— | — | @@ -28,12 +28,5 @@ |
29 | 29 | EOF; |
30 | 30 | } |
31 | 31 | |
32 | | -global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgUseDatabaseMessages, $wgMemc; |
33 | | -$wgMainCacheType = CACHE_NONE; |
34 | | -$wgMessageCacheType = CACHE_NONE; |
35 | | -$wgParserCacheType = CACHE_NONE; |
36 | | -$wgUseDatabaseMessages = false; # Set for future resets |
37 | | -$wgMemc = new FakeMemCachedClient; |
38 | | - |
39 | 32 | /** @todo Check if this is really needed */ |
40 | 33 | MessageCache::destroyInstance(); |
Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | $prefix = $dbType != 'oracle' ? self::DB_PREFIX : self::ORA_DB_PREFIX; |
117 | 117 | |
118 | 118 | $this->dbClone = new CloneDatabase( $this->db, $tables, $prefix ); |
119 | | - $this->dbClone->useTemporaryTables( false ); //reported problems with temp tables, disabling until fixed |
| 119 | + $this->dbClone->useTemporaryTables( $this->useTemporaryTables ); |
120 | 120 | $this->dbClone->cloneTableStructure(); |
121 | 121 | |
122 | 122 | if ( $dbType == 'oracle' ) |
Index: trunk/phase3/tests/phpunit/phpunit.php |
— | — | @@ -15,8 +15,28 @@ |
16 | 16 | define( 'MW_PHPUNIT_TEST', true ); |
17 | 17 | |
18 | 18 | // Start up MediaWiki in command-line mode |
19 | | -require_once( "$IP/maintenance/commandLine.inc" ); |
| 19 | +require_once( "$IP/maintenance/Maintenance.php" ); |
20 | 20 | |
| 21 | +class PHPUnitMaintClass extends Maintenance { |
| 22 | + public function finalSetup() { |
| 23 | + $settings = parent::finalSetup(); |
| 24 | + |
| 25 | + global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgUseDatabaseMessages; |
| 26 | + |
| 27 | + $wgMainCacheType = CACHE_NONE; |
| 28 | + $wgMessageCacheType = CACHE_NONE; |
| 29 | + $wgParserCacheType = CACHE_NONE; |
| 30 | + $wgUseDatabaseMessages = false; # Set for future resets |
| 31 | + } |
| 32 | + public function execute() { } |
| 33 | + public function getDbType() { |
| 34 | + return Maintenance::DB_ADMIN; |
| 35 | + } |
| 36 | +} |
| 37 | + |
| 38 | +$maintClass = 'PHPUnitMaintClass'; |
| 39 | +require( RUN_MAINTENANCE_IF_MAIN ); |
| 40 | + |
21 | 41 | // Assume UTC for testing purposes |
22 | 42 | $wgLocaltimezone = 'UTC'; |
23 | 43 | |