Remove unneeded methods in tests
authoraddshore <addshorewiki@gmail.com>
Fri, 25 Oct 2013 09:30:44 +0000 (10:30 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 28 Oct 2013 16:48:56 +0000 (16:48 +0000)
Change-Id: Ia2da4027f2cc4a3aaff02695bab35de32a33ed60

tests/phpunit/includes/content/WikitextContentTest.php
tests/phpunit/includes/upload/UploadFromUrlTest.php

index 9f20073..1d133f3 100644 (file)
@@ -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( '',
index e680632..397c100 100644 (file)
@@ -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" );