Change record status: 
Project: 
Introduced in branch: 
8.8.x
Introduced in version: 
8.8.0
Description: 

As part of the ongoing work to isolate the test infrastructure from the simpletest module, simpletest's PHPUnit and JUnit functions are now refactored to classes in the Drupal\Core\Test namespace.

The functions themselves are deprecated for removal before Drupal 9.0.0.

The methods which replace them are marked @internal, so contrib should not rely on them as an API. Their behaviors are being kept so that core can continue to use run-tests.sh, and will likely change over time.

These functions are replaced by methods on two utility classes:

  • \Drupal\Core\Test\PhpUnitTestRunner
  • \Drupal\Core\Test\JUnitConverter

Replace them this way:

  • Deprecated function -> New method
  • simpletest_run_phpunit_tests() -> PhpUnitTestRunner::runTests()
  • simpletest_phpunit_xml_filepath() -> PhpUnitTestRunner::xmlLogFilePath()
  • simpletest_phpunit_run_command() -> PhpUnitTestRunner::runCommand()
  • simpletest_phpunit_command() -> PhpUnitTestRunner::phpUnitCommand()
  • simpletest_summarize_phpunit_result() -> PhpUnitTestRunner::summarizeResults()
  • simpletest_phpunit_xml_to_rows() -> JUnitConverter::xmlToRows()
  • simpletest_phpunit_find_testcases() -> JUnitConverter::findTestCases()
  • simpletest_phpunit_testcase_to_row() -> JUnitConverter::convertTestCaseToSimpletestRow()
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done