The first Functional test we will write is for the Hello World page we created and the functionality behind it. We will test if the page shows the correct Hello World message, also depending on the value found in the configuration. So let's create the class for it, naturally in the hello_world module, inside the tests/src/Functional folder:
namespace Drupal\Tests\hello_world\Functional; use Drupal\Tests\BrowserTestBase; /** * Basic testing of the main Hello World page. * * @group hello_world */ class HelloWorldPageTest extends BrowserTestBase {}
You can really see the consistency with the other types of tests. But in this case, as mentioned, we extend from BrowserTestBase.
Also, like before, we can configure a number ...