function TestRun::createNew

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

Returns a new test run object.

Parameters

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

Return value

self The new test run object.

6 calls to TestRun::createNew()
PhpUnitTestRunnerTest::testRunTestsError in core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php
Tests an error in the test running phase.
TestRunTest::testCreateAndGet in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
@covers ::createNew[[api-linebreak]] @covers ::get[[api-linebreak]] @covers ::id[[api-linebreak]] @covers ::insertLogEntry[[api-linebreak]] @covers ::setDatabasePrefix[[api-linebreak]] @covers ::getDatabasePrefix[[api-linebreak]] @covers…
TestRunTest::testCreateAndRemove in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
@covers ::createNew[[api-linebreak]] @covers ::id[[api-linebreak]] @covers ::insertLogEntry[[api-linebreak]] @covers ::setDatabasePrefix[[api-linebreak]]
TestRunTest::testGetLogEntriesByTestClass in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
@covers ::createNew[[api-linebreak]] @covers ::insertLogEntry[[api-linebreak]] @covers ::setDatabasePrefix[[api-linebreak]] @covers ::getLogEntriesByTestClass[[api-linebreak]] @covers ::getDatabasePrefix[[api-linebreak]] @covers…
TestRunTest::testProcessPhpErrorLogFile in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
@covers ::createNew[[api-linebreak]] @covers ::setDatabasePrefix[[api-linebreak]] @covers ::processPhpErrorLogFile[[api-linebreak]] @covers ::getLogEntriesByTestClass[[api-linebreak]]

... See full list

File

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

Class

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

Namespace

Drupal\Core\Test

Code

public static function createNew(TestRunResultsStorageInterface $test_run_results_storage) : TestRun {
  $test_id = $test_run_results_storage->createNew();
  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.