r63357 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63356‎ | r63357 | r63358 >
Date:04:26, 7 March 2010
Author:mah
Status:deferred (Comments)
Tags:
Comment:
* 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)
Modified paths:
  • /trunk/phase3/maintenance/tests/ApiTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit.xml (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/ApiTest.php
@@ -57,9 +57,10 @@
5858 }
5959
6060 function testApi() {
61 - global $wgServerName, $wgServer, $wgDBprefix;
 61+ global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype;
6262
63 - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
 63+ if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_'))
 64+ $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
6465 if(!isset($wgServerName) || !isset($wgServer)) {
6566 $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
6667 'be set in LocalSettings.php');
@@ -74,9 +75,10 @@
7576 }
7677
7778 function testApiLoginNoName() {
78 - global $wgServerName, $wgServer, $wgDBprefix;
 79+ global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype;
7980
80 - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
 81+ if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_'))
 82+ $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
8183 if(!isset($wgServerName) || !isset($wgServer)) {
8284 $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
8385 'be set in LocalSettings.php');
@@ -94,9 +96,10 @@
9597 }
9698
9799 function testApiLoginBadPass() {
98 - global $wgServerName, $wgServer, $wgDBprefix;
 100+ global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype;
99101
100 - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
 102+ if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_'))
 103+ $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
101104 if(!isset($wgServerName) || !isset($wgServer)) {
102105 $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
103106 'be set in LocalSettings.php');
@@ -114,9 +117,10 @@
115118 }
116119
117120 function testApiLoginGoodPass() {
118 - global $wgServerName, $wgServer, $wgDBprefix;
 121+ global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype;
119122
120 - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
 123+ if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_'))
 124+ $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
121125 if(!isset($wgServerName) || !isset($wgServer)) {
122126 $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
123127 'be set in LocalSettings.php');
@@ -134,9 +138,10 @@
135139 }
136140
137141 function testApiGotCookie() {
138 - global $wgServerName, $wgServer, $wgScriptPath, $wgDBprefix;
 142+ global $wgServerName, $wgServer, $wgScriptPath, $wgDBprefix, $wgDBtype;
139143
140 - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
 144+ if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_'))
 145+ $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
141146 if(!isset($wgServerName) || !isset($wgServer)) {
142147 $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
143148 'be set in LocalSettings.php');
@@ -159,9 +164,10 @@
160165 */
161166 function testApiListPages(CookieJar $cj) {
162167 $this->markTestIncomplete("Not done with this yet");
163 - global $wgServerName, $wgServer, $wgDBprefix;
 168+ global $wgServerName, $wgServer, $wgDBprefix, $wgDBtype;
164169
165 - if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
 170+ if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_'))
 171+ $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
166172 if($wgServerName == "localhost" || $wgServer == "http://localhost") {
167173 $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
168174 'be set in LocalSettings.php');
Index: trunk/phase3/maintenance/tests/phpunit.xml
@@ -1,25 +1,25 @@
22 <!-- See http://www.phpunit.de/manual/3.3/en/appendixes.configuration.html -->
33 <phpunit bootstrap="./bootstrap.php"
4 - colors="false"
 4+ colors="true"
 5+ backupGlobals="false"
 6+ convertErrorsToExceptions="true"
 7+ convertNoticesToExceptions="true"
 8+ convertWarningsToExceptions="true"
59 stopOnFailure="false">
6 - <!-- convertErrorsToExceptions="true" -->
7 - <!-- convertNoticesToExceptions="true" -->
8 - <!-- convertWarningsToExceptions="true" -->
910 <testsuite name="MediaWiki Test Suite">
10 - <directory>.</directory>
11 - <!-- <file>HttpTest.php</file> -->
12 - <!-- <file>SearchEngineTest.php</file> -->
13 - <!-- <file>SiteConfigurationTest.php</file> -->
14 - <!-- <file>RevisionTest.php</file> -->
15 - <!-- <file>XmlTest.php</file> -->
16 - <!-- <file>TimeAdjustTest.php</file> -->
17 - <!-- <file>ApiTest.php</file> -->
18 - <!-- <file>LanguageConverterTest.php</file> -->
19 - <!-- <file>TitleTest.php</file> -->
20 - <!-- <file>UploadFromChunksTest.php</file> -->
21 - <!-- <file>LocalFileTest.php</file> -->
22 - <!-- <file>XmlTest.php</file> -->
23 - <!-- <file>MediaWikiParserTest.php</file> -->
 11+ <!-- <directory>.</directory> -->
 12+ <file>ApiTest.php</file>
 13+ <file>HttpTest.php</file>
 14+ <file>LanguageConverterTest.php</file>
 15+ <file>LocalFileTest.php</file>
 16+ <file>MediaWikiParserTest.php</file>
 17+ <file>RevisionTest.php</file>
 18+ <file>SearchEngineTest.php</file>
 19+ <file>SiteConfigurationTest.php</file>
 20+ <file>TimeAdjustTest.php</file>
 21+ <file>TitleTest.php</file>
 22+ <file>UploadFromChunksTest.php</file>
 23+ <file>XmlTest.php</file>
2424 </testsuite>
2525 <groups>
2626 <exclude>

Comments

#Comment by Hashar (talk | contribs)   16:39, 29 October 2010

deferred since it is old and tests

Status & tagging log