Tests: Make phpunit providers "public static".
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiBlockTest.php
index 52f1d28..8842766 100644 (file)
@@ -3,6 +3,7 @@
 /**
  * @group API
  * @group Database
+ * @group medium
  */
 class ApiBlockTest extends ApiTestCase {
 
@@ -44,7 +45,7 @@ class ApiBlockTest extends ApiTestCase {
                        $this->markTestIncomplete( "The user UTApiBlockee does not exist" );
                }
 
-               if( !isset( $data[0]['query']['pages'] ) ) {
+               if ( !isset( $data[0]['query']['pages'] ) ) {
                        $this->markTestIncomplete( "No block token found" );
                }
 
@@ -58,7 +59,7 @@ class ApiBlockTest extends ApiTestCase {
                        'reason' => 'Some reason',
                        'token' => $pageinfo['blocktoken'] ), null, false, self::$users['sysop']->user );
 
-               $block = Block::newFromTarget('UTApiBlockee');
+               $block = Block::newFromTarget( 'UTApiBlockee' );
 
                $this->assertTrue( !is_null( $block ), 'Block is valid' );
 
@@ -98,7 +99,7 @@ class ApiBlockTest extends ApiTestCase {
                                'action' => $action,
                                'user' => 'UTApiBlockee',
                                'reason' => 'Some reason',
-                               ),
+                       ),
                        null,
                        false,
                        self::$users['sysop']->user
@@ -108,9 +109,9 @@ class ApiBlockTest extends ApiTestCase {
        /**
         * Just provide the 'block' and 'unblock' action to test both API calls
         */
-       function provideBlockUnblockAction() {
+       public static function provideBlockUnblockAction() {
                return array(
-                       array( 'block'   ),
+                       array( 'block' ),
                        array( 'unblock' ),
                );
        }