From c87d5c3da11ccb063578b114b7a6c1de52d64015 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 25 Feb 2010 09:33:17 +0000 Subject: [PATCH] follow up r62948 handle oracle prefix --- maintenance/tests/ApiTest.php | 12 ++++++------ maintenance/tests/MediaWiki_Setup.php | 8 +++++++- maintenance/tests/SearchMySQLTest.php | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/maintenance/tests/ApiTest.php b/maintenance/tests/ApiTest.php index 2dbe55c671..bebcffee5b 100644 --- a/maintenance/tests/ApiTest.php +++ b/maintenance/tests/ApiTest.php @@ -59,7 +59,7 @@ class ApiTest extends ApiSetup { function testApi() { global $wgServerName, $wgServer, $wgDBprefix; - if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); + if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); @@ -76,7 +76,7 @@ class ApiTest extends ApiSetup { function testApiLoginNoName() { global $wgServerName, $wgServer, $wgDBprefix; - if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); + if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); @@ -96,7 +96,7 @@ class ApiTest extends ApiSetup { function testApiLoginBadPass() { global $wgServerName, $wgServer, $wgDBprefix; - if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); + if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); @@ -116,7 +116,7 @@ class ApiTest extends ApiSetup { function testApiLoginGoodPass() { global $wgServerName, $wgServer, $wgDBprefix; - if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); + if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); @@ -136,7 +136,7 @@ class ApiTest extends ApiSetup { function testApiGotCookie() { global $wgServerName, $wgServer, $wgScriptPath, $wgDBprefix; - if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); + if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); @@ -161,7 +161,7 @@ class ApiTest extends ApiSetup { $this->markTestIncomplete("Not done with this yet"); global $wgServerName, $wgServer, $wgDBprefix; - if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); + if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); if($wgServerName == "localhost" || $wgServer == "http://localhost") { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); diff --git a/maintenance/tests/MediaWiki_Setup.php b/maintenance/tests/MediaWiki_Setup.php index e7acc338b5..21f0321e5c 100644 --- a/maintenance/tests/MediaWiki_Setup.php +++ b/maintenance/tests/MediaWiki_Setup.php @@ -9,7 +9,13 @@ abstract class MediaWiki_Setup extends PHPUnit_Framework_TestCase { $oldTableNames = array(); foreach( $tables as $table ) $oldTableNames[$table] = $db->tableName( $table ); - $db->tablePrefix( 'parsertest_' ); + if($wgDBtype == 'oracle') { + $wgDBprefix === 'pt_'; + } else { + $wgDBprefix === 'parsertest_'; + } + + $db->tablePrefix( $wgDBprefix ); if( $db->isOpen() ) { foreach ( $tables as $tbl ) { diff --git a/maintenance/tests/SearchMySQLTest.php b/maintenance/tests/SearchMySQLTest.php index ee5de0b84a..0c2ad2293a 100644 --- a/maintenance/tests/SearchMySQLTest.php +++ b/maintenance/tests/SearchMySQLTest.php @@ -6,7 +6,7 @@ class SearchMySQLTest extends SearchEngineTest { function setUp() { global $wgDBprefix; - if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); + if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests"); $GLOBALS['wgContLang'] = new Language; $this->db = $this->buildTestDatabase( -- 2.20.1