Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Latest commit

 

History

History
56 lines (38 loc) · 1.33 KB

File metadata and controls

56 lines (38 loc) · 1.33 KB

Using PHP Built-in Server to run automated testing

Description

phpunit is widely used to unit-test PHP code. Using the PHP built-in server, it can be used to run End-to-End, Functional and Black Box tests (see #9), #15, #20 here) to verify that your application is behaving as expected and that the rendered output is correct. It is a viable alternative to more complex testing tools, such as Selenium Web Driver, for simple web applications or even static websites (static content needs validation too).

Included tests

Requirements

Installation

Clone the repository, then run:

$ composer install

Usage

Simulate passing tests

Run:

$ ./vendor/bin/phpunit

Simulate errors

Remove the .skip_this extension from:

then run:

$ ./vendor/bin/phpunit