diff --git a/core/modules/user/tests/src/Kernel/LegacyUserTest.php b/core/modules/user/tests/src/Kernel/LegacyUserTest.php index a62a23e4ba..6d431fd203 100644 --- a/core/modules/user/tests/src/Kernel/LegacyUserTest.php +++ b/core/modules/user/tests/src/Kernel/LegacyUserTest.php @@ -2,13 +2,12 @@ namespace Drupal\Tests\user\Kernel; +use Drupal\Core\Session\AccountInterface; use Drupal\KernelTests\KernelTestBase; use Drupal\user\Entity\Role; -use Drupal\user\Entity\User; -use Drupal\user\UserInterface; /** - * Tests account saving for arbitrary new uid. + * Tests deprecated user module functions. * * @group user * @group legacy @@ -30,8 +29,8 @@ public function testUserRolePrmissions() { $this->expectDeprecation('user_role_permissions() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement beyond loading the roles and calling \Drupal\user\Entity\Role::getPermissions(). See https://www.drupal.org/node/3348138'); $expected = [ - UserInterface::ANONYMOUS_ROLE => [], - UserInterface::AUTHENTICATED_ROLE => [], + AccountInterface::ANONYMOUS_ROLE => [], + AccountInterface::AUTHENTICATED_ROLE => [], ]; $permissions = user_role_permissions(array_keys($expected)); $this->assertSame($expected, $permissions);