Search⌘ K
AI Features

Creating Our First Browser Test

Explore how to set up and run a browser test in PHP using PHPUnit and Panther. Understand making GET requests, inspecting page content, and writing assertions to verify your homepage displays correctly.

We'll cover the following...

Adding a test for the homepage

In the first real test that we will now create, a GET request will be made to the homepage (/) and it will be verified if the server returns the right page. We need several things for that:

  1. The PHP web server should already be running before we run the test. This will be taken care of by Panther, which is a PHPUnit extension that starts the PHP web server for us before it runs the
...