class EntityKernelTestBaseTest

Same name and namespace in other branches
  1. 11.x 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());
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.