function TransactionTest::insertRow
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php \Drupal\KernelTests\Core\Database\TransactionTest::insertRow()
- 8.9.x core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php \Drupal\KernelTests\Core\Database\TransactionTest::insertRow()
Inserts a single row into the testing table.
18 calls to TransactionTest::insertRow()
- TransactionTest::createFirstSavepointTransaction in core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php - Create a Drupal savepoint transaction after root.
- TransactionTest::createRootTransaction in core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php - Create a root Drupal transaction.
- TransactionTest::rootTransactionCallback in core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php - A post-transaction callback for testing purposes.
- TransactionTest::testCommitAfterRollbackSameSavepoint in core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php - Tests savepoint transaction commit after rollback.
- TransactionTest::testCommitWithActiveSavepoint in core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php - Tests committing a transaction while savepoints are active.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php, line 698
Class
- TransactionTest
- Tests the transactions, using the explicit ::commitOrRelease method.
Namespace
Drupal\KernelTests\Core\DatabaseCode
protected function insertRow(string $name) : void {
$this->connection
->insert('test')
->fields([
'name' => $name,
])
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.