public function SchemaTest::providerTestSchemaCreateTablePrimaryKey in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php \Drupal\KernelTests\Core\Database\SchemaTest::providerTestSchemaCreateTablePrimaryKey()
Provides test cases for SchemaTest::testSchemaCreateTablePrimaryKey().
Return value
array An array of test cases for SchemaTest::testSchemaCreateTablePrimaryKey().
File
- core/
tests/ Drupal/ KernelTests/ Core/ Database/ SchemaTest.php, line 887
Class
- SchemaTest
- Tests table creation and modification via the schema API.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function providerTestSchemaCreateTablePrimaryKey() {
$tests = [];
$tests['simple_primary_key'] = [
'initial_primary_key' => [
'test_field',
],
'renamed_primary_key' => [
'test_field_renamed',
],
];
$tests['composite_primary_key'] = [
'initial_primary_key' => [
'test_field',
'other_test_field',
],
'renamed_primary_key' => [
'test_field_renamed',
'other_test_field',
],
];
$tests['composite_primary_key_different_order'] = [
'initial_primary_key' => [
'other_test_field',
'test_field',
],
'renamed_primary_key' => [
'other_test_field',
'test_field_renamed',
],
];
return $tests;
}