class EntityKernelTestBaseTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBaseTest
@covers \Drupal\KernelTests\Core\Entity\EntityKernelTestBase
@group Entity
Hierarchy
- class \Drupal\KernelTests\KernelTestBase extends \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 implements \PHPUnit\Framework\TestCase
- class \Drupal\KernelTests\Core\Entity\EntityKernelTestBase uses \Drupal\Tests\user\Traits\UserCreationTrait implements \Drupal\KernelTests\KernelTestBase
- class \Drupal\KernelTests\Core\Entity\EntityKernelTestBaseTest implements \Drupal\KernelTests\Core\Entity\EntityKernelTestBase
- class \Drupal\KernelTests\Core\Entity\EntityKernelTestBase uses \Drupal\Tests\user\Traits\UserCreationTrait implements \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of EntityKernelTestBaseTest
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityKernelTestBaseTest.php, line 10
Namespace
Drupal\KernelTests\Core\EntityView 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.