From 4d19d362e857a5b3b0cf0fbcac533541115e3682 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Sun, 7 Mar 2010 04:26:23 +0000 Subject: [PATCH] * Fix a global problem. * Stop serialisation of PDO objects for sqlite * temporarily order tests so they work (shouldn't be necessary in the long run) --- maintenance/tests/ApiTest.php | 30 +++++++++++++++++------------ maintenance/tests/phpunit.xml | 36 +++++++++++++++++------------------ 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/maintenance/tests/ApiTest.php b/maintenance/tests/ApiTest.php index bebcffee5b..4b838ce73d 100644 --- a/maintenance/tests/ApiTest.php +++ b/maintenance/tests/ApiTest.php @@ -57,9 +57,10 @@ class ApiTest extends ApiSetup { } function testApi() { - global $wgServerName, $wgServer, $wgDBprefix; + global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype; - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $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'); @@ -74,9 +75,10 @@ class ApiTest extends ApiSetup { } function testApiLoginNoName() { - global $wgServerName, $wgServer, $wgDBprefix; + global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype; - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $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'); @@ -94,9 +96,10 @@ class ApiTest extends ApiSetup { } function testApiLoginBadPass() { - global $wgServerName, $wgServer, $wgDBprefix; + global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype; - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $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'); @@ -114,9 +117,10 @@ class ApiTest extends ApiSetup { } function testApiLoginGoodPass() { - global $wgServerName, $wgServer, $wgDBprefix; + global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype; - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $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'); @@ -134,9 +138,10 @@ class ApiTest extends ApiSetup { } function testApiGotCookie() { - global $wgServerName, $wgServer, $wgScriptPath, $wgDBprefix; + global $wgServerName, $wgServer, $wgScriptPath, $wgDBprefix, $wgDBtype; - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $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'); @@ -159,9 +164,10 @@ class ApiTest extends ApiSetup { */ function testApiListPages(CookieJar $cj) { $this->markTestIncomplete("Not done with this yet"); - global $wgServerName, $wgServer, $wgDBprefix; + global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype; - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $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/phpunit.xml b/maintenance/tests/phpunit.xml index ac081ff7e7..0a02d25c2c 100644 --- a/maintenance/tests/phpunit.xml +++ b/maintenance/tests/phpunit.xml @@ -1,25 +1,25 @@ - - - - . - - - - - - - - - - - - - + + ApiTest.php + HttpTest.php + LanguageConverterTest.php + LocalFileTest.php + MediaWikiParserTest.php + RevisionTest.php + SearchEngineTest.php + SiteConfigurationTest.php + TimeAdjustTest.php + TitleTest.php + UploadFromChunksTest.php + XmlTest.php -- 2.20.1