* Fix a global problem.
authorMark A. Hershberger <mah@users.mediawiki.org>
Sun, 7 Mar 2010 04:26:23 +0000 (04:26 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Sun, 7 Mar 2010 04:26:23 +0000 (04:26 +0000)
* 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
maintenance/tests/phpunit.xml

index bebcffe..4b838ce 100644 (file)
@@ -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');
index ac081ff..0a02d25 100644 (file)
@@ -1,25 +1,25 @@
 <!-- See http://www.phpunit.de/manual/3.3/en/appendixes.configuration.html -->
 <phpunit bootstrap="./bootstrap.php"
-         colors="false"
+         colors="true"
+         backupGlobals="false"
+         convertErrorsToExceptions="true"
+         convertNoticesToExceptions="true"
+         convertWarningsToExceptions="true"
          stopOnFailure="false">
-         <!-- convertErrorsToExceptions="true" -->
-         <!-- convertNoticesToExceptions="true" -->
-         <!-- convertWarningsToExceptions="true" -->
   <testsuite name="MediaWiki Test Suite">
-    <directory>.</directory>
-    <!-- <file>HttpTest.php</file> -->
-    <!-- <file>SearchEngineTest.php</file> -->
-    <!-- <file>SiteConfigurationTest.php</file> -->
-    <!-- <file>RevisionTest.php</file> -->
-    <!-- <file>XmlTest.php</file> -->
-    <!-- <file>TimeAdjustTest.php</file> -->
-    <!-- <file>ApiTest.php</file> -->
-    <!-- <file>LanguageConverterTest.php</file> -->
-    <!-- <file>TitleTest.php</file> -->
-    <!-- <file>UploadFromChunksTest.php</file> -->
-    <!-- <file>LocalFileTest.php</file> -->
-    <!-- <file>XmlTest.php</file> -->
-    <!-- <file>MediaWikiParserTest.php</file> -->
+    <!-- <directory>.</directory> -->
+    <file>ApiTest.php</file>
+    <file>HttpTest.php</file>
+    <file>LanguageConverterTest.php</file>
+    <file>LocalFileTest.php</file>
+    <file>MediaWikiParserTest.php</file>
+    <file>RevisionTest.php</file>
+    <file>SearchEngineTest.php</file>
+    <file>SiteConfigurationTest.php</file>
+    <file>TimeAdjustTest.php</file>
+    <file>TitleTest.php</file>
+    <file>UploadFromChunksTest.php</file>
+    <file>XmlTest.php</file>
   </testsuite>
   <groups>
     <exclude>