function TestRunTest::getTestLogEntry

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php \Drupal\KernelTests\Core\Test\TestRunTest::getTestLogEntry()
  2. 10 core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php \Drupal\KernelTests\Core\Test\TestRunTest::getTestLogEntry()

Returns a sample test run log entry.

Parameters

string $test_class: The test class.

Return value

string[] An array with the elements to be logged.

3 calls to TestRunTest::getTestLogEntry()
TestRunTest::testCreateAndGet in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
Tests create and get.
TestRunTest::testCreateAndRemove in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
Tests create and remove.
TestRunTest::testGetLogEntriesByTestClass in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
Tests get log entries by test class.

File

core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php, line 294

Class

TestRunTest
Tests Drupal\Core\Test\TestRun.

Namespace

Drupal\KernelTests\Core\Test

Code

protected function getTestLogEntry(string $test_class) : array {
  return [
    'test_class' => $test_class,
    'status' => 'pass',
    'message' => 'Major Tom',
    'message_group' => 'other',
  ];
}

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