Module Development

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

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.