Do you need a Functional test for that?

Drupal has four PHPUnit test suites: Unit, Kernel, Functional, and FunctionalJavascript. Each test suite offers various levels of integration with the Drupal code base.

  • Unit tests are stateless
  • Kernel tests allow for minimal Drupal bootstrapping for stateful testing with the database
  • Functional tests perform a full Drupal installation and allow interacting with Drupal through a mocked browser
  • FunctionalJavascript tests perform a full Drupal installation and allow interacting with Drupal…