function DriverSpecificTransactionTestBase::insertRow

Same name in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php \Drupal\KernelTests\Core\Database\DriverSpecificTransactionTestBase::insertRow()

Inserts a single row into the testing table.

14 calls to DriverSpecificTransactionTestBase::insertRow()
DriverSpecificTransactionTestBase::createFirstSavepointTransaction in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php
Create a Drupal savepoint transaction after root.
DriverSpecificTransactionTestBase::createRootTransaction in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php
Create a root Drupal transaction.
DriverSpecificTransactionTestBase::rootTransactionCallback in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php
A post-transaction callback for testing purposes.
DriverSpecificTransactionTestBase::testCommitWithActiveSavepoint in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php
Tests committing a transaction while savepoints are active.
DriverSpecificTransactionTestBase::testConnectionDeprecations in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php
Tests deprecation of Connection methods.

... See full list

File

core/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php, line 451

Class

DriverSpecificTransactionTestBase
Tests the transaction abstraction system.

Namespace

Drupal\KernelTests\Core\Database

Code

protected function insertRow($name) {
    $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.