function EntitySchemaTest::providerTestPrimaryKeyUpdate
Same name in other branches
- 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php \Drupal\KernelTests\Core\Entity\EntitySchemaTest::providerTestPrimaryKeyUpdate()
- 10 core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php \Drupal\KernelTests\Core\Entity\EntitySchemaTest::providerTestPrimaryKeyUpdate()
- 11.x 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 284
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.