function TestRunTest::getTestLogEntry

Same name in other branches
  1. 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
@covers ::createNew @covers ::get @covers ::id @covers ::insertLogEntry @covers ::setDatabasePrefix @covers ::getDatabasePrefix @covers ::getTestClass
TestRunTest::testCreateAndRemove in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
@covers ::createNew @covers ::id @covers ::insertLogEntry @covers ::setDatabasePrefix
TestRunTest::testGetLogEntriesByTestClass in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
@covers ::createNew @covers ::insertLogEntry @covers ::setDatabasePrefix @covers ::getLogEntriesByTestClass @covers ::getDatabasePrefix @covers ::getTestClass

File

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

Class

TestRunTest
@coversDefaultClass \Drupal\Core\Test\TestRun @group Test

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.