You are here

protected function TransactionTest::insertRow in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Database/TransactionTest.php \Drupal\system\Tests\Database\TransactionTest::insertRow()

Inserts a single row into the testing table.

2 calls to TransactionTest::insertRow()
TransactionTest::testTransactionStacking in core/modules/system/src/Tests/Database/TransactionTest.php
Tests transaction stacking, commit, and rollback.
TransactionTest::testTransactionWithDdlStatement in core/modules/system/src/Tests/Database/TransactionTest.php
Tests the compatibility of transactions with DDL statements.

File

core/modules/system/src/Tests/Database/TransactionTest.php, line 317
Contains \Drupal\system\Tests\Database\TransactionTest.

Class

TransactionTest
Tests the transaction abstraction system.

Namespace

Drupal\system\Tests\Database

Code

protected function insertRow($name) {
  db_insert('test')
    ->fields(array(
    'name' => $name,
  ))
    ->execute();
}