Convert Tests from Simpletest to PHPUnit for Drupal 8, Drupal 9

Last updated March 14, 2022
Module Development8.9.x/9.3.x

Simpletest has been removed from Drupal 9. If you're preparing to upgrade your site to the latest version of Drupal and you have Simpletests in your codebase that extend WebTestBase you'll need to update them to use PHPUnit's BrowserTestBase class instead. This will ensure your tests don't depend on a deprecated testing framework. By the end of this tutorial, you should be able to convert WebTestBase-based Simpletests to use PHPUnit's BrowserTestBase class instead.