function TransactionTest::cleanUp

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php \Drupal\KernelTests\Core\Database\TransactionTest::cleanUp()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php \Drupal\KernelTests\Core\Database\TransactionTest::cleanUp()

Starts over for a new test.

3 calls to TransactionTest::cleanUp()
TransactionTest::testRollbackAfterDdlStatementForNonTransactionalDdlDatabase in core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php
Tests rollback after a DDL statement when no transactional DDL supported.
TransactionTest::testTransactionStacking in core/tests/Drupal/KernelTests/Core/Database/TransactionTest.php
Tests transaction stacking, commit, and rollback.
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 727

Class

TransactionTest
Tests the transactions, using the explicit ::commitOrRelease method.

Namespace

Drupal\KernelTests\Core\Database

Code

protected function cleanUp() : void {
    $this->connection
        ->truncate('test')
        ->execute();
    $this->postTransactionCallbackAction = NULL;
    $this->assertSame(0, $this->connection
        ->transactionManager()
        ->stackDepth());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.