);
}
- /**
- * @todo Test needs database! Should be done by a test class in the Database group.
- */
- /*
- public function getRedirectChain() {
- $text = $this->getNativeData();
- return Title::newFromRedirectArray( $text );
- }
- */
-
- /**
- * @todo Test needs database! Should be done by a test class in the Database group.
- */
- /*
- public function getUltimateRedirectTarget() {
- $text = $this->getNativeData();
- return Title::newFromRedirectRecurse( $text );
- }
- */
-
public static function dataIsCountable() {
return array(
array( '',
}
/**
- * @todo Document why we test login, since the $wgUser hack used doesn't
- * require login
- *
- * @coversNothing
- */
- public function testLogin() {
- $data = $this->doApiRequest( array(
- 'action' => 'login',
- 'lgname' => $this->user->userName,
- 'lgpassword' => $this->user->passWord ) );
- $this->assertArrayHasKey( "login", $data[0] );
- $this->assertArrayHasKey( "result", $data[0]['login'] );
- $this->assertEquals( "NeedToken", $data[0]['login']['result'] );
- $token = $data[0]['login']['token'];
-
- $data = $this->doApiRequest( array(
- 'action' => 'login',
- "lgtoken" => $token,
- 'lgname' => $this->user->userName,
- 'lgpassword' => $this->user->passWord ) );
-
- $this->assertArrayHasKey( "login", $data[0] );
- $this->assertArrayHasKey( "result", $data[0]['login'] );
- $this->assertEquals( "Success", $data[0]['login']['result'] );
- $this->assertArrayHasKey( 'lgtoken', $data[0]['login'] );
-
- return $data;
- }
-
- /**
- * @depends testLogin
* @depends testClearQueue
*/
public function testSetupUrlDownload( $data ) {
}
/**
- * @depends testLogin
* @depends testClearQueue
*/
public function testAsyncUpload( $data ) {
}
/**
- * @depends testLogin
* @depends testClearQueue
*/
public function testAsyncUploadWarning( $data ) {
}
/**
- * @depends testLogin
* @depends testClearQueue
*/
public function testSyncDownload( $data ) {
return $data;
}
- /**
- *
- */
protected function deleteFile( $name ) {
$t = Title::newFromText( $name, NS_FILE );
$this->assertTrue( $t->exists(), "File '$name' exists" );