Merge "Slight improvements to FormSpecialPage behavior."
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiWatchTest.php
index b7ae292..a9bc43a 100644 (file)
@@ -3,10 +3,10 @@
 /**
  * @group API
  * @group Database
+ * @group medium
  * @todo This test suite is severly broken and need a full review
  */
 class ApiWatchTest extends ApiTestCase {
-
        protected function setUp() {
                parent::setUp();
                $this->doLogin();
@@ -94,8 +94,7 @@ class ApiWatchTest extends ApiTestCase {
        /**
         */
        function testGetRollbackToken() {
-
-               $pageinfo = $this->getTokens();
+               $this->getTokens();
 
                if ( !Title::newFromText( 'Help:UTPage' )->exists() ) {
                        $this->markTestSkipped( "The article [[Help:UTPage]] does not exist" ); //TODO: just create it?
@@ -146,8 +145,8 @@ class ApiWatchTest extends ApiTestCase {
 
                        $this->assertArrayHasKey( 'rollback', $data[0] );
                        $this->assertArrayHasKey( 'title', $data[0]['rollback'] );
-               } catch( UsageException $ue ) {
-                       if( $ue->getCodeString() == 'onlyauthor' ) {
+               } catch ( UsageException $ue ) {
+                       if ( $ue->getCodeString() == 'onlyauthor' ) {
                                $this->markTestIncomplete( "Only one author to 'Help:UTPage', cannot test rollback" );
                        } else {
                                $this->fail( "Received error '" . $ue->getCodeString() . "'" );
@@ -167,7 +166,7 @@ class ApiWatchTest extends ApiTestCase {
                $this->assertArrayHasKey( 'delete', $data[0] );
                $this->assertArrayHasKey( 'title', $data[0]['delete'] );
 
-               $data = $this->doApiRequest( array(
+               $this->doApiRequest( array(
                        'action' => 'query',
                        'list' => 'watchlist' ) );