public function EntitySchemaTest::providerTestPrimaryKeyUpdate in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php \Drupal\KernelTests\Core\Entity\EntitySchemaTest::providerTestPrimaryKeyUpdate()
Provides test cases for EntitySchemaTest::testPrimaryKeyUpdate()
Return value
array An array of test cases consisting of an entity type ID and a field name.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntitySchemaTest.php, line 270
Class
- EntitySchemaTest
- Tests the default entity storage schema handler.
Namespace
Drupal\KernelTests\Core\EntityCode
public function providerTestPrimaryKeyUpdate() {
// Build up test cases for all possible entity type configurations.
// For each entity type we test reinstalling each field that is part of
// any table's primary key.
$tests = [];
$tests['entity_test:id'] = [
'entity_test',
'id',
];
$tests['entity_test_rev:id'] = [
'entity_test_rev',
'id',
];
$tests['entity_test_rev:revision_id'] = [
'entity_test_rev',
'revision_id',
];
$tests['entity_test_mul:id'] = [
'entity_test_mul',
'id',
];
$tests['entity_test_mul:langcode'] = [
'entity_test_mul',
'langcode',
];
$tests['entity_test_mulrev:id'] = [
'entity_test_mulrev',
'id',
];
$tests['entity_test_mulrev:revision_id'] = [
'entity_test_mulrev',
'revision_id',
];
$tests['entity_test_mulrev:langcode'] = [
'entity_test_mulrev',
'langcode',
];
return $tests;
}