Skip to content

A sample app that shows how to run automated functional tests using the PHP built-in server

Notifications You must be signed in to change notification settings

edonosotti/php-functional-tests-sample-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Maintainability

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