You are here

public function UserLegacyTest::testUserPassword in Drupal 9

File

core/modules/user/tests/src/Kernel/UserLegacyTest.php, line 20

Class

UserLegacyTest
Tests legacy user functionality.

Namespace

Drupal\Tests\user\Kernel

Code

public function testUserPassword() {
  $this
    ->expectDeprecation('user_password() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use \\Drupal\\Core\\Password\\PasswordGeneratorInterface::generate() instead. See https://www.drupal.org/node/3153113');
  $this
    ->assertNotEmpty(user_password());
}