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

In order to further isolate the simpletest module from core's test runner infrastructure, simpletest_clean_*() functions have been moved to some environmental cleaner classes.

These functions have been deprecated:

  • simpletest_clean_environment()
  • simpletest_clean_database()
  • simpletest_clean_temporary_directories()
  • simpletest_clean_results_table()

These have been replaced by classes which implement the Drupal\Core\Test\EnvironmentCleanerInterface interface:

  • Drupal\Core\Test\EnvironmentCleanerInterface::cleanEnvironment($clear_results = TRUE, $clear_temp_directories = TRUE, $clear_database = TRUE)
  • Drupal\Core\Test\EnvironmentCleanerInterface::cleanDatabase()
  • Drupal\Core\Test\EnvironmentCleanerInterface::cleanTemporaryDirectories()
  • Drupal\Core\Test\EnvironmentCleanerInterface::cleanResultsTable($test_id = NULL)

Within the simpletest module, developers should access the environment_cleaner service and call the desired method.

In other contexts, developers should create a new Drupal\Core\Test\EnvironmentCleaner object and use it to clean up after tests.

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