function TestRun::get

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

Returns a test run object from storage.

Parameters

\Drupal\Core\Test\TestRunResultsStorageInterface $test_run_results_storage: The test run results storage.

int|string $test_id: The test run id.

Return value

self The test run object.

4 calls to TestRun::get()
SimpletestTestRunResultsStorageTest::testBuildEnvironmentKeepingExistingResults in core/tests/Drupal/KernelTests/Core/Test/SimpletestTestRunResultsStorageTest.php
@covers ::buildTestingResultsEnvironment @covers ::validateTestingResultsEnvironment @covers ::createNew @covers ::insertLogEntry @covers ::cleanUp
SimpletestTestRunResultsStorageTest::testGetCurrentTestRunState in core/tests/Drupal/KernelTests/Core/Test/SimpletestTestRunResultsStorageTest.php
@covers ::buildTestingResultsEnvironment @covers ::createNew @covers ::insertLogEntry @covers ::setDatabasePrefix @covers ::removeResults
SimpletestTestRunResultsStorageTest::testGetLogEntriesByTestClass in core/tests/Drupal/KernelTests/Core/Test/SimpletestTestRunResultsStorageTest.php
@covers ::buildTestingResultsEnvironment @covers ::createNew @covers ::insertLogEntry @covers ::setDatabasePrefix @covers ::getLogEntriesByTestClass
TestRunTest::testCreateAndGet in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
@covers ::createNew @covers ::get @covers ::id @covers ::insertLogEntry @covers ::setDatabasePrefix @covers ::getDatabasePrefix @covers ::getTestClass

File

core/lib/Drupal/Core/Test/TestRun.php, line 65

Class

TestRun
Implements an object that tracks execution of a test run.

Namespace

Drupal\Core\Test

Code

public static function get(TestRunResultsStorageInterface $test_run_results_storage, int|string $test_id) : TestRun {
    return new static($test_run_results_storage, $test_id);
}

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