Index: trunk/phase3/tests/phpunit/includes/api/ApiTest.php |
— | — | @@ -148,6 +148,9 @@ |
149 | 149 | $this->assertEquals( "Success", $a ); |
150 | 150 | } |
151 | 151 | |
| 152 | + /** |
| 153 | + * @group Broken |
| 154 | + */ |
152 | 155 | function testApiGotCookie() { |
153 | 156 | $this->markTestIncomplete( "The server can't do external HTTP requests, and the internal one won't give cookies" ); |
154 | 157 | |
— | — | @@ -192,24 +195,23 @@ |
193 | 196 | } |
194 | 197 | |
195 | 198 | /** |
196 | | - * @depends testApiGotCookie |
| 199 | + * @todo Finish filling me out...what are we trying to test here? |
197 | 200 | */ |
198 | | - function testApiListPages( CookieJar $cj ) { |
199 | | - $this->markTestIncomplete( "Not done with this yet" ); |
| 201 | + function testApiListPages() { |
200 | 202 | global $wgServer; |
201 | | - |
202 | | - if ( $wgServer == "http://localhost" ) { |
| 203 | + if ( !isset( $wgServer ) ) { |
203 | 204 | $this->markTestIncomplete( 'This test needs $wgServer to be set in LocalSettings.php' ); |
204 | 205 | } |
205 | | - $req = MWHttpRequest::factory( self::$apiUrl . "?action=query&format=xml&prop=revisions&" . |
206 | | - "titles=Main%20Page&rvprop=timestamp|user|comment|content" ); |
207 | | - $req->setCookieJar( $cj ); |
208 | | - $req->execute(); |
209 | | - libxml_use_internal_errors( true ); |
210 | | - $sxe = simplexml_load_string( $req->getContent() ); |
211 | | - $this->assertNotInternalType( "bool", $sxe ); |
212 | | - $this->assertThat( $sxe, $this->isInstanceOf( "SimpleXMLElement" ) ); |
213 | | - $a = $sxe->query[0]->pages[0]->page[0]->attributes(); |
| 206 | + |
| 207 | + $ret = $this->doApiRequest( array( |
| 208 | + 'action' => 'query', |
| 209 | + 'prop' => 'revisions', |
| 210 | + 'titles' => 'Main Page', |
| 211 | + 'rvprop' => 'timestamp|user|comment|content', |
| 212 | + ) ); |
| 213 | + |
| 214 | + $result = $ret[0]['query']['pages']; |
| 215 | + $this->markTestIncomplete( "Somebody needs to finish loving me" ); |
214 | 216 | } |
215 | 217 | |
216 | 218 | function testRunLogin() { |
Index: trunk/phase3/tests/phpunit/includes/api/ApiWatchTest.php |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @depends testWatchEdit |
| 45 | + * @group Broken |
45 | 46 | */ |
46 | 47 | function testWatchClear() { |
47 | 48 | |