You are here

public function EntityTypeTest::testId in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testId()
  2. 10 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testId()

@covers ::id

File

core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php, line 307

Class

EntityTypeTest
@coversDefaultClass \Drupal\Core\Entity\EntityType @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

public function testId() {
  $id = $this
    ->randomMachineName(32);
  $entity_type = $this
    ->setUpEntityType([
    'id' => $id,
  ]);
  $this
    ->assertEquals($id, $entity_type
    ->id());
}