public function KernelTestBaseTest::testInstallEntitySchema in Drupal 8
Tests expected behavior of installEntitySchema().
File
- core/
modules/ simpletest/ src/ Tests/ KernelTestBaseTest.php, line 203
Class
- KernelTestBaseTest
- Tests KernelTestBase functionality.
Namespace
Drupal\simpletest\TestsCode
public function testInstallEntitySchema() {
$entity = 'entity_test';
// The entity_test Entity has a field that depends on the User module.
$this
->enableModules([
'user',
]);
// Verity that the entity schema is created properly.
$this
->installEntitySchema($entity);
$this
->assertTrue(Database::getConnection()
->schema()
->tableExists($entity), "'{$entity}' database table found.");
}