Index: trunk/phase3/maintenance/tests/ApiTest.php |
— | — | @@ -57,7 +57,9 @@ |
58 | 58 | } |
59 | 59 | |
60 | 60 | function testApi() { |
61 | | - if(!isset($wgServername) || !isset($wgServer)) { |
| 61 | + global $wgServerName, $wgServer; |
| 62 | + |
| 63 | + if(!isset($wgServerName) || !isset($wgServer)) { |
62 | 64 | $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. |
63 | 65 | 'be set in LocalSettings.php'); |
64 | 66 | } |
— | — | @@ -71,7 +73,9 @@ |
72 | 74 | } |
73 | 75 | |
74 | 76 | function testApiLoginNoName() { |
75 | | - if(!isset($wgServername) || !isset($wgServer)) { |
| 77 | + global $wgServerName, $wgServer; |
| 78 | + |
| 79 | + if(!isset($wgServerName) || !isset($wgServer)) { |
76 | 80 | $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. |
77 | 81 | 'be set in LocalSettings.php'); |
78 | 82 | } |
— | — | @@ -88,7 +92,9 @@ |
89 | 93 | } |
90 | 94 | |
91 | 95 | function testApiLoginBadPass() { |
92 | | - if(!isset($wgServername) || !isset($wgServer)) { |
| 96 | + global $wgServerName, $wgServer; |
| 97 | + |
| 98 | + if(!isset($wgServerName) || !isset($wgServer)) { |
93 | 99 | $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. |
94 | 100 | 'be set in LocalSettings.php'); |
95 | 101 | } |
— | — | @@ -105,7 +111,9 @@ |
106 | 112 | } |
107 | 113 | |
108 | 114 | function testApiLoginGoodPass() { |
109 | | - if(!isset($wgServername) || !isset($wgServer)) { |
| 115 | + global $wgServerName, $wgServer; |
| 116 | + |
| 117 | + if(!isset($wgServerName) || !isset($wgServer)) { |
110 | 118 | $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. |
111 | 119 | 'be set in LocalSettings.php'); |
112 | 120 | } |
— | — | @@ -122,9 +130,9 @@ |
123 | 131 | } |
124 | 132 | |
125 | 133 | function testApiGotCookie() { |
126 | | - global $wgScriptPath, $wgServerName; |
| 134 | + global $wgServerName, $wgServer, $wgScriptPath; |
127 | 135 | |
128 | | - if(!isset($wgServername) || !isset($wgServer)) { |
| 136 | + if(!isset($wgServerName) || !isset($wgServer)) { |
129 | 137 | $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. |
130 | 138 | 'be set in LocalSettings.php'); |
131 | 139 | } |
— | — | @@ -146,6 +154,7 @@ |
147 | 155 | */ |
148 | 156 | function testApiListPages(CookieJar $cj) { |
149 | 157 | $this->markTestIncomplete("Not done with this yet"); |
| 158 | + global $wgServerName, $wgServer; |
150 | 159 | |
151 | 160 | if($wgServerName == "localhost" || $wgServer == "http://localhost") { |
152 | 161 | $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. |