w/s changes.
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiBlockTest.php
index a7dbcf8..b90e77b 100644 (file)
@@ -12,14 +12,14 @@ class ApiBlockTest extends ApiTestSetup {
                parent::setUp();
                $this->doLogin();
        }
-       
+
        function getTokens() {
                return $this->getTokenList( $this->sysopUser );
        }
 
        function addDBData() {
                $user = User::newFromName( 'UTBlockee' );
-               
+
                if ( $user->getId() == 0 ) {
                        $user->addToDatabase();
                        $user->setPassword( 'UTBlockeePassword' );
@@ -29,23 +29,23 @@ class ApiBlockTest extends ApiTestSetup {
        }
 
        function testMakeNormalBlock() {
-               
+
                $data = $this->getTokens();
-               
+
                $user = User::newFromName( 'UTBlockee' );
-               
+
                if ( !$user->getId() ) {
                        $this->markTestIncomplete( "The user UTBlockee does not exist" );
                }
-               
+
                if( !isset( $data[0]['query']['pages'] ) ) {
                        $this->markTestIncomplete( "No block token found" );
                }
-               
+
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
-               
+
                $data = $this->doApiRequest( array(
                        'action' => 'block',
                        'user' => 'UTBlockee',
@@ -53,13 +53,13 @@ class ApiBlockTest extends ApiTestSetup {
                        'token' => $pageinfo['blocktoken'] ), $data );
 
                $block = Block::newFromTarget('UTBlockee');
-               
+
                $this->assertTrue( !is_null( $block ), 'Block is valid' );
 
                $this->assertEquals( 'UTBlockee', (string)$block->getTarget() );
                $this->assertEquals( 'Some reason', $block->mReason );
                $this->assertEquals( 'infinity', $block->mExpiry );
-               
+
        }
 
 }