function TemplateProjectTestBase::formLogin

Helper that uses Drupal's user/login form to log in.

Parameters

string $username: Username.

string $password: Password.

string $working_dir: (optional) A working directory within which to login. Defaults to the workspace directory.

Overrides QuickStartTestBase::formLogin

1 call to TemplateProjectTestBase::formLogin()
TemplateProjectTestBase::createTestProject in core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
Creates a test project from a given template and installs Drupal.

File

core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php, line 210

Class

TemplateProjectTestBase
Base class for tests which create a test site from a core project template.

Namespace

Drupal\Tests\package_manager\Build

Code

public function formLogin($username, $password, $working_dir = NULL) : void {
  parent::formLogin($username, $password, $working_dir ?: $this->webRoot);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.