From c739d8c4fccc9686ee2b196bbeeeec7542dbaf03 Mon Sep 17 00:00:00 2001 From: addshore Date: Fri, 25 Oct 2013 10:30:44 +0100 Subject: [PATCH] Remove unneeded methods in tests Change-Id: Ia2da4027f2cc4a3aaff02695bab35de32a33ed60 --- .../includes/content/WikitextContentTest.php | 20 ---------- .../includes/upload/UploadFromUrlTest.php | 37 ------------------- 2 files changed, 57 deletions(-) diff --git a/tests/phpunit/includes/content/WikitextContentTest.php b/tests/phpunit/includes/content/WikitextContentTest.php index 9f20073d2d..1d133f3236 100644 --- a/tests/phpunit/includes/content/WikitextContentTest.php +++ b/tests/phpunit/includes/content/WikitextContentTest.php @@ -245,26 +245,6 @@ just a test" ); } - /** - * @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( '', diff --git a/tests/phpunit/includes/upload/UploadFromUrlTest.php b/tests/phpunit/includes/upload/UploadFromUrlTest.php index e6806327bd..397c100bc0 100644 --- a/tests/phpunit/includes/upload/UploadFromUrlTest.php +++ b/tests/phpunit/includes/upload/UploadFromUrlTest.php @@ -48,37 +48,6 @@ class UploadFromUrlTest extends ApiTestCase { } /** - * @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 ) { @@ -152,7 +121,6 @@ class UploadFromUrlTest extends ApiTestCase { } /** - * @depends testLogin * @depends testClearQueue */ public function testAsyncUpload( $data ) { @@ -171,7 +139,6 @@ class UploadFromUrlTest extends ApiTestCase { } /** - * @depends testLogin * @depends testClearQueue */ public function testAsyncUploadWarning( $data ) { @@ -201,7 +168,6 @@ class UploadFromUrlTest extends ApiTestCase { } /** - * @depends testLogin * @depends testClearQueue */ public function testSyncDownload( $data ) { @@ -333,9 +299,6 @@ class UploadFromUrlTest extends ApiTestCase { return $data; } - /** - * - */ protected function deleteFile( $name ) { $t = Title::newFromText( $name, NS_FILE ); $this->assertTrue( $t->exists(), "File '$name' exists" ); -- 2.20.1