You are here

public function UserAuthTest::testAuthenticateWithMissingCredentials in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/tests/src/Unit/UserAuthTest.php \Drupal\Tests\user\Unit\UserAuthTest::testAuthenticateWithMissingCredentials()

Tests failing authentication with missing credential parameters.

@covers ::authenticate

@dataProvider providerTestAuthenticateWithMissingCredentials

File

core/modules/user/tests/src/Unit/UserAuthTest.php, line 90
Contains \Drupal\Tests\user\Unit\UserAuthTest.

Class

UserAuthTest
@coversDefaultClass \Drupal\user\UserAuth @group user

Namespace

Drupal\Tests\user\Unit

Code

public function testAuthenticateWithMissingCredentials($username, $password) {
  $this->userStorage
    ->expects($this
    ->never())
    ->method('loadByProperties');
  $this
    ->assertFalse($this->userAuth
    ->authenticate($username, $password));
}