function KernelTestBaseTest::testInstallEntitySchema

Tests expected behavior of installEntitySchema().

File

core/modules/simpletest/src/Tests/KernelTestBaseTest.php, line 203

Class

KernelTestBaseTest
Tests KernelTestBase functionality.

Namespace

Drupal\simpletest\Tests

Code

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.");
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.