Merge "Add SPARQL client to core"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiLoginTest.php
index 97681eb..ed4d683 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Wikimedia\TestingAccessWrapper;
+
 /**
  * @group API
  * @group Database
@@ -140,7 +142,7 @@ class ApiLoginTest extends ApiTestCase {
                libxml_use_internal_errors( true );
                $sxe = simplexml_load_string( $req->getContent() );
                $this->assertNotInternalType( "bool", $sxe );
-               $this->assertThat( $sxe, $this->isInstanceOf( "SimpleXMLElement" ) );
+               $this->assertThat( $sxe, $this->isInstanceOf( SimpleXMLElement::class ) );
                $this->assertNotInternalType( "null", $sxe->login[0] );
 
                $a = $sxe->login[0]->attributes()->result[0];
@@ -188,7 +190,6 @@ class ApiLoginTest extends ApiTestCase {
                $this->assertArrayHasKey( "login", $data[0] );
                $this->assertArrayHasKey( "result", $data[0]['login'] );
                $this->assertEquals( "Success", $data[0]['login']['result'] );
-               $this->assertArrayHasKey( 'lgtoken', $data[0]['login'] );
        }
 
        public function testBotPassword() {