add broken test to broken group (not incomplete)
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 30 May 2011 18:58:07 +0000 (18:58 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 30 May 2011 18:58:07 +0000 (18:58 +0000)
This test suite really needs to be fixed, marking them as incomplete does not
let us tests them easily.  Instead, I have added them to the Broken group thus
we can easily run them and do not break the continuous integration system.

tests/phpunit/includes/api/ApiWatchTest.php

index ea8c438..cd35a5b 100644 (file)
@@ -5,6 +5,7 @@ require_once dirname( __FILE__ ) . '/ApiSetup.php';
 /**
  * @group Database
  * @group Destructive
+ * @todo This test suite is severly broken and need a full review 
  */
 class ApiWatchTest extends ApiTestSetup {
 
@@ -17,11 +18,13 @@ class ApiWatchTest extends ApiTestSetup {
                return $this->getTokenList( $this->sysopUser );
        }
 
+       /**
+        * @group Broken
+        */
        function testWatchEdit() {
                
                $data = $this->getTokens();
                
-               $this->markTestIncomplete( "Broken" );
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
@@ -68,12 +71,13 @@ class ApiWatchTest extends ApiTestSetup {
                return $data;
        }
 
-       
+       /**
+        * @group Broken
+        */      
        function testWatchProtect() {
                
                $data = $this->getTokens();
                
-               $this->markTestIncomplete( "Broken" );
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
@@ -125,6 +129,7 @@ class ApiWatchTest extends ApiTestSetup {
 
        /**
         * @depends testGetRollbackToken
+        * @group Broken
         */
        function testWatchRollback( $data ) {
                $keys = array_keys( $data[0]['query']['pages'] );
@@ -142,7 +147,7 @@ class ApiWatchTest extends ApiTestSetup {
                        if( $ue->getCodeString() == 'onlyauthor' ) {
                                $this->markTestIncomplete( "Only one author to 'UTPage', cannot test rollback" );
                        } else {
-                               $this->fail( "Received error " . $ue->getCodeString() );
+                               $this->fail( "Received error '" . $ue->getCodeString() . "'" );
                        }
                }
 
@@ -150,12 +155,13 @@ class ApiWatchTest extends ApiTestSetup {
                $this->assertArrayHasKey( 'title', $data[0]['rollback'] );
        }
 
-       
+       /**
+        * @group Broken
+        */
        function testWatchDelete() {
                
                $data = $this->getTokens();
                
-               $this->markTestIncomplete( "Broken" );
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];