Regroup all API tests in the 'API' PHPUnit group
authorAntoine Musso <hashar@free.fr>
Mon, 2 Apr 2012 13:33:43 +0000 (15:33 +0200)
committerAntoine Musso <hashar@free.fr>
Mon, 2 Apr 2012 14:55:31 +0000 (16:55 +0200)
That will let us tests all the API tests by using PHPUnit group
filtering such as:

 php phpunit.php --group API

Also cleaned some whitespaces

Patchset-4: skipped files that had only whitespace changes

Change-Id: I51e03d910521b061f505e3a9b11a08c7b95f1538

tests/phpunit/includes/api/ApiBlockTest.php
tests/phpunit/includes/api/ApiPurgeTest.php
tests/phpunit/includes/api/ApiQueryTest.php
tests/phpunit/includes/api/ApiTest.php
tests/phpunit/includes/api/ApiUploadTest.php
tests/phpunit/includes/api/ApiWatchTest.php

index 514da42..d9ea7b5 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 /**
+ * @group API
  * @group Database
  */
 class ApiBlockTest extends ApiTestCase {
index 70c2074..2566c6c 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 /**
+ * @group API
  * @group Database
  */
 class ApiPurgeTest extends ApiTestCase {
index ae05a30..a4b9dc7 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 /**
+ * @group API
  * @group Database
  */
 class ApiQueryTest extends ApiTestCase {
index 1d9c323..c3eacd5 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 /**
+ * @group API
  * @group Database
  */
 class ApiTest extends ApiTestCase {
index b780374..d2c742a 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 
 /**
+ * @group API
  * @group Database
- * @todo This test suite is severly broken and need a full review 
+ * @todo This test suite is severly broken and need a full review
  */
 class ApiWatchTest extends ApiTestCase {
 
@@ -10,7 +11,7 @@ class ApiWatchTest extends ApiTestCase {
                parent::setUp();
                $this->doLogin();
        }
-       
+
        function getTokens() {
                return $this->getTokenList( self::$users['sysop'] );
        }
@@ -19,9 +20,9 @@ class ApiWatchTest extends ApiTestCase {
         * @group Broken
         */
        function testWatchEdit() {
-               
+
                $data = $this->getTokens();
-               
+
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
@@ -44,7 +45,7 @@ class ApiWatchTest extends ApiTestCase {
         * @group Broken
         */
        function testWatchClear() {
-       
+
                $data = $this->doApiRequest( array(
                        'action' => 'query',
                        'list' => 'watchlist' ), $data );
@@ -71,11 +72,11 @@ class ApiWatchTest extends ApiTestCase {
 
        /**
         * @group Broken
-        */      
+        */
        function testWatchProtect() {
-               
+
                $data = $this->getTokens();
-               
+
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
@@ -97,9 +98,9 @@ class ApiWatchTest extends ApiTestCase {
         * @group Broken
         */
        function testGetRollbackToken() {
-               
+
                $data = $this->getTokens();
-               
+
                if ( !Title::newFromText( 'UTPage' )->exists() ) {
                        $this->markTestIncomplete( "The article [[UTPage]] does not exist" );
                }
@@ -159,9 +160,9 @@ class ApiWatchTest extends ApiTestCase {
         * @group Broken
         */
        function testWatchDelete() {
-               
+
                $data = $this->getTokens();
-               
+
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];