class UserLegacyTest
Same name and namespace in other branches
- 8.9.x core/modules/user/tests/src/Kernel/UserLegacyTest.php \Drupal\Tests\user\Kernel\UserLegacyTest
Tests legacy user functionality.
@group user @group legacy
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\user\Kernel\UserLegacyTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of UserLegacyTest
File
-
core/
modules/ user/ tests/ src/ Kernel/ UserLegacyTest.php, line 13
Namespace
Drupal\Tests\user\KernelView source
class UserLegacyTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'user',
];
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());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.