function UserLoginHttpTest::testLogin
Tests user session life cycle.
File
-
core/
modules/ user/ tests/ src/ Functional/ UserLoginHttpTest.php, line 104
Class
- UserLoginHttpTest
- Tests login and password reset via direct HTTP.
Namespace
Drupal\Tests\user\FunctionalCode
public function testLogin() : void {
// Without the serialization module only JSON is supported.
$this->doTestLogin('json');
// Enable serialization so we have access to additional formats.
$this->container
->get('module_installer')
->install([
'serialization',
]);
$this->rebuildAll();
$this->doTestLogin('json');
$this->doTestLogin('xml');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.