public function KernelTestBaseTest::testInstallEntitySchema in SimpleTest 8.3
Tests expected behavior of installEntitySchema().
File
- 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.");
}