function SimpletestTestRunResultsStorage::createNew

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

Overrides TestRunResultsStorageInterface::createNew

File

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

Class

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

Namespace

Drupal\Core\Test

Code

public function createNew() : int|string {
    return $this->connection
        ->insert('simpletest_test_id')
        ->useDefaults([
        'test_id',
    ])
        ->execute();
}

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