function 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 757  
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.