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
Tests build environment keeping existing results.
SimpletestTestRunResultsStorageTest::testGetCurrentTestRunState in core/tests/Drupal/KernelTests/Core/Test/SimpletestTestRunResultsStorageTest.php
Tests get current test run state.
SimpletestTestRunResultsStorageTest::testGetLogEntriesByTestClass in core/tests/Drupal/KernelTests/Core/Test/SimpletestTestRunResultsStorageTest.php
Tests get log entries by test class.
TestRunTest::testCreateAndGet in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
Tests create and get.

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.