You are here

function KernelTestBaseTest::testInstallEntitySchema in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/Tests/KernelTestBaseTest.php \Drupal\simpletest\Tests\KernelTestBaseTest::testInstallEntitySchema()

Tests expected behavior of installEntitySchema().

File

core/modules/simpletest/src/Tests/KernelTestBaseTest.php, line 205
Contains \Drupal\simpletest\Tests\KernelTestBaseTest.

Class

KernelTestBaseTest
Tests KernelTestBase functionality.

Namespace

Drupal\simpletest\Tests

Code

function testInstallEntitySchema() {
  $entity = 'entity_test';

  // The entity_test Entity has a field that depends on the User module.
  $this
    ->enableModules(array(
    'user',
  ));

  // Verity that the entity schema is created properly.
  $this
    ->installEntitySchema($entity);
  $this
    ->assertTrue(db_table_exists($entity), "'{$entity}' database table found.");
}