You are here

public function EntityTypeTest::testIsInternal 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::testIsInternal()

Tests the isInternal() method.

File

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

Class

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

Namespace

Drupal\Tests\Core\Entity

Code

public function testIsInternal() {
  $entity_type = $this
    ->setUpEntityType([
    'internal' => TRUE,
  ]);
  $this
    ->assertTrue($entity_type
    ->isInternal());
  $entity_type = $this
    ->setUpEntityType([
    'internal' => FALSE,
  ]);
  $this
    ->assertFalse($entity_type
    ->isInternal());
  $entity_type = $this
    ->setUpEntityType([]);
  $this
    ->assertFalse($entity_type
    ->isInternal());
}