function TransactionTest::executeDDLStatement
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php \Drupal\KernelTests\Core\Database\TransactionTest::executeDDLStatement()
- 8.9.x core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php \Drupal\KernelTests\Core\Database\TransactionTest::executeDDLStatement()
Executes a DDL statement.
3 calls to TransactionTest::executeDDLStatement()
- TransactionTest::testCommitAfterDdl in core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php - Tests commit does not fail when committing after DDL.
- TransactionTest::testRollbackAfterDdlStatementForNonTransactionalDdlDatabase in core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php - Tests rollback after a DDL statement when no transactional DDL supported.
- TransactionTest::testTransactionWithDdlStatement in core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php - Tests the compatibility of transactions with DDL statements.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php, line 709
Class
- TransactionTest
- Tests the transactions, using the explicit ::commitOrRelease method.
Namespace
Drupal\KernelTests\Core\DatabaseCode
protected function executeDDLStatement() : void {
static $count = 0;
$table = [
'fields' => [
'id' => [
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
],
'primary key' => [
'id',
],
];
$this->connection
->schema()
->createTable('database_test_' . ++$count, $table);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.