protected function FieldableEntityDefinitionUpdateTest::assertBundleFieldSchema in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php \Drupal\KernelTests\Core\Entity\FieldableEntityDefinitionUpdateTest::assertBundleFieldSchema()
- 9 core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php \Drupal\KernelTests\Core\Entity\FieldableEntityDefinitionUpdateTest::assertBundleFieldSchema()
Asserts that the bundle field schema is correct.
@internal
Parameters
bool $revisionable: Whether the entity type is revisionable or not.
1 call to FieldableEntityDefinitionUpdateTest::assertBundleFieldSchema()
- FieldableEntityDefinitionUpdateTest::assertEntityTypeSchema in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ FieldableEntityDefinitionUpdateTest.php - Asserts revisionable and/or translatable characteristics of an entity type.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Entity/ FieldableEntityDefinitionUpdateTest.php, line 636
Class
- FieldableEntityDefinitionUpdateTest
- Tests EntityDefinitionUpdateManager's fieldable entity update functionality.
Namespace
Drupal\KernelTests\Core\EntityCode
protected function assertBundleFieldSchema(bool $revisionable) : void {
$entity_type_id = 'entity_test_update';
$field_storage_definition = $this->entityFieldManager
->getFieldStorageDefinitions($entity_type_id)['new_bundle_field'];
$database_schema = $this->database
->schema();
/** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */
$table_mapping = $this->entityTypeManager
->getStorage($entity_type_id)
->getTableMapping();
$this
->assertTrue($database_schema
->tableExists($table_mapping
->getDedicatedDataTableName($field_storage_definition)));
if ($revisionable) {
$this
->assertTrue($database_schema
->tableExists($table_mapping
->getDedicatedRevisionTableName($field_storage_definition)));
}
}