function SimpletestTestRunResultsStorage::createNew

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

Gets a new unique identifier for a test run.

Return value

int|string A unique identifier.

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.