Same name in this branch
  1. 10 core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php \Drupal\KernelTests\Core\Database\NextIdTest::setUp()
  2. 10 core/modules/mysql/tests/src/Kernel/mysql/NextIdTest.php \Drupal\Tests\mysql\Kernel\mysql\NextIdTest::setUp()
Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php \Drupal\KernelTests\Core\Database\NextIdTest::setUp()
  2. 9 core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php \Drupal\KernelTests\Core\Database\NextIdTest::setUp()

Overrides DatabaseTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php, line 25

Class

NextIdTest
Tests the sequences API.

Namespace

Drupal\KernelTests\Core\Database

Code

protected function setUp() : void {
  parent::setUp();
  $table_specification = [
    'description' => 'Stores IDs.',
    'fields' => [
      'value' => [
        'description' => 'The value of the sequence.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
    ],
    'primary key' => [
      'value',
    ],
  ];
  $this->connection
    ->schema()
    ->createTable('sequences', $table_specification);
}