EntityKernelTestBaseTest.php

Same filename and directory in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php
  3. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php

Namespace

Drupal\KernelTests\Core\Entity

File

core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\KernelTests\Core\Entity;


/**
 * @covers \Drupal\KernelTests\Core\Entity\EntityKernelTestBase
 *
 * @group Entity
 */
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() : void {
    $account = $this->setUpCurrentUser();
    $current_user = \Drupal::currentUser();
    $this->assertSame($account->id(), $current_user->id());
  }

}

Classes

Title Deprecated Summary
EntityKernelTestBaseTest @covers \Drupal\KernelTests\Core\Entity\EntityKernelTestBase[[api-linebreak]]

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