function LoginCommandTest::buildLoginCommandTester

Builds a CommandTester to test the user:login command.

2 calls to LoginCommandTest::buildLoginCommandTester()
LoginCommandTest::testBlockedUser in core/modules/user/tests/src/Kernel/Command/LoginCommandTest.php
Tests trying to get a login link for a blocked user.
LoginCommandTest::testLoginInvalidUsers in core/modules/user/tests/src/Kernel/Command/LoginCommandTest.php
Tests invalid login attempts.

File

core/modules/user/tests/src/Kernel/Command/LoginCommandTest.php, line 102

Class

LoginCommandTest
Tests user:login console command failure modes (blocked, user not found).

Namespace

Drupal\Tests\user\Kernel\Command

Code

protected function buildLoginCommandTester() : CommandTester {
  $command = new LoginCommand($this->container
    ->get('entity_type.manager'), $this->container
    ->get(OneTimeAuthentication::class));
  return new CommandTester($command);
}

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