$sxe = simplexml_load_string( $req->getContent() );
$this->assertNotType( "bool", $sxe );
$this->assertThat( $sxe, $this->isInstanceOf( "SimpleXMLElement" ) );
+ $this->assertNotType( "null", $sxe->login[0] );
$a = $sxe->login[0]->attributes()->result[0];
$this->assertEquals( ' result="NeedToken"', $a->asXML() );
$sxe = simplexml_load_string( $req->getContent() );
$this->assertNotType( "bool", $sxe );
$this->assertThat( $sxe, $this->isInstanceOf( "SimpleXMLElement" ) );
+ $this->assertNotType( "null", $sxe->login[0] );
$a = $sxe->login[0]->attributes()->result[0];
$this->assertEquals( ' result="NeedToken"', $a->asXML() );
$req->execute();
$cj = $req->getCookieJar();
- $this->assertRegexp( '/_session=[^;]*; .*UserID=[0-9]*; .*UserName=' . self::$userName . '; .*Token=/',
- $cj->serializeToHttpRequest( $wgScriptPath, $wgServerName ) );
+ $serializedCookie = $cj->serializeToHttpRequest( $wgScriptPath, $wgServerName );
+ $this->assertNotEquals( '', $serializedCookie );
+ $this->assertRegexp( '/_session=[^;]*; .*UserID=[0-9]*; .*UserName=' . self::$userName . '; .*Token=/', $serializedCookie );
return $cj;