function TestRunTest::testProcessPhpUnitResults

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

@covers ::insertLogEntry

File

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

Class

TestRunTest
@coversDefaultClass \Drupal\Core\Test\TestRun[[api-linebreak]] @group Test

Namespace

Drupal\KernelTests\Core\Test

Code

public function testProcessPhpUnitResults() : void {
  $phpunit_error_xml = __DIR__ . '/../../../Tests/Core/Test/fixtures/phpunit_error.xml';
  $res = JUnitConverter::xmlToRows(1, $phpunit_error_xml);
  $runner = PhpUnitTestRunner::create(\Drupal::getContainer());
  $test_run = TestRun::createNew($this->testRunResultsStorage);
  $runner->processPhpUnitResults($test_run, $res);
  $this->assertEquals(4, $this->connection
    ->select('simpletest')
    ->countQuery()
    ->execute()
    ->fetchField());
}

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