$oInfo = $context->exportSession();
$this->assertEquals( '127.0.0.1', $oInfo['ip'], "Correct initial IP address." );
$this->assertEquals( 0, $oInfo['userId'], "Correct initial user ID." );
+ $this->assertFalse( MediaWiki\Session\SessionManager::getGlobalSession()->isPersistent(),
+ 'Global session isn\'t persistent to start' );
$user = User::newFromName( 'UnitTestContextUser' );
$user->addToDatabase();
$this->assertEquals( $oInfo['headers'], $info['headers'], "Correct restored headers." );
$this->assertEquals( $oInfo['sessionId'], $info['sessionId'], "Correct restored session ID." );
$this->assertEquals( $oInfo['userId'], $info['userId'], "Correct restored user ID." );
+ $this->assertFalse( MediaWiki\Session\SessionManager::getGlobalSession()->isPersistent(),
+ 'Global session isn\'t persistent after restoring the context' );
}
}