PHPUnit

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
PHPUnit
Developer(s)Sebastian Bergmann
Initial release15 March 2004; 14 years ago (2004-03-15)[1]
Stable release
7.1.3 / 13 April 2018; 6 months ago (2018-04-13)[2]
Repository Edit this at Wikidata
Written inPHP
Operating systemCross-platform
TypeUnit test
LicenseBSD 3 Clause
Websitephpunit.de

PHPUnit is a unit testing framework for the PHP programming language. It is an instance of the xUnit architecture for unit testing frameworks that originated with SUnit and became popular with JUnit. PHPUnit was created by Sebastian Bergmann and its development is hosted on GitHub.

Purpose[edit]

PHPUnit is based on the idea that developers should be able to find mistakes in their newly committed code quickly and assert that no code regression has occurred in other parts of the code base. Much like other unit testing frameworks, PHPUnit uses assertions to verify that the behavior of the specific component - or "unit" - being tested behaves as expected.[3]

Benefits[edit]

The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. A unit test provides a strict, written contract that the piece of code must satisfy. As a result, unit tests find problems early in the development cycle.

PHPUnit can output test results in a number of different formats, including JUnit XML and TestDox.

References[edit]

External links[edit]