You are here

class EntityKernelTestBaseTest in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBaseTest
  2. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBaseTest

@covers \Drupal\KernelTests\Core\Entity\EntityKernelTestBase

@group Entity

Hierarchy

Expanded class hierarchy of EntityKernelTestBaseTest

File

core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php, line 10

Namespace

Drupal\KernelTests\Core\Entity
View source
class EntityKernelTestBaseTest extends EntityKernelTestBase {

  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    parent::setUp();
    $this
      ->createUser();
  }

  /**
   * Tests that the current user is set up correctly.
   */
  public function testSetUpCurrentUser() {
    $account = $this
      ->setUpCurrentUser();
    $current_user = \Drupal::currentUser();
    $this
      ->assertSame($account
      ->id(), $current_user
      ->id());
  }

}

Members