function SimpletestTestRunResultsStorage::cleanUp

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php \Drupal\Core\Test\SimpletestTestRunResultsStorage::cleanUp()

Overrides TestRunResultsStorageInterface::cleanUp

File

core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php, line 170

Class

SimpletestTestRunResultsStorage
Implements a test run results storage compatible with legacy Simpletest.

Namespace

Drupal\Core\Test

Code

public function cleanUp() : int {
    // Clear test results.
    $this->connection
        ->startTransaction('delete_simpletest');
    $this->connection
        ->delete('simpletest')
        ->execute();
    $count = $this->connection
        ->delete('simpletest_test_id')
        ->execute();
    return $count;
}

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