SimpleTest - Unit Testing for PHP
PHP XSLT HTML JavaScript Shell CSS
Switch branches/tags
Clone or download
perrick Merge pull request #51 from chellem/master
Update group_test_documentation.xml
Latest commit 713ffea Sep 1, 2017
Failed to load latest commit information.
.phan added config for Phan (Static Analyser), referencing https://github.c… Dec 22, 2016
docs Update group_test_documentation.xml Aug 4, 2017
extensions cleanup extension CodeCoverage Dec 25, 2016
packages Using the modern versionless html DOCTYPE: Nov 23, 2016
test add testReferenceAssertionOnObject() Mar 10, 2017
tutorials/SimpleTest replace deprecated setReturnValue() with returns(). Dec 3, 2015
.gitattributes added two more files to ignore Dec 3, 2015
.gitignore ignore from gitattributes files to shrink zip Dec 2, 2015
.php_cs enforce short_array_syntax on php-cs-fixer runs Jul 31, 2016
.travis.yml travis: do not test using hhvm [skip ci] Jun 12, 2017 update Mar 31, 2017
LICENSE License change Sep 11, 2006 cleanup Mar 10, 2017
TODO.xml Changing the TODO to reflect the "maintenance mode" Jan 12, 2012
VERSION fixed changelog compare links and updated VERSION Dec 6, 2015
arguments.php compute the size beforehand, and not on each iteration (moved count()… Jul 31, 2016
authentication.php cs fixes Dec 2, 2015
autorun.php return the status of the test suite and not always true Jul 30, 2016
browser.php Add import / export cookies function Mar 31, 2017
collector.php replace deprecated usage of $test->addTestFile() with $test->addFile(). Dec 3, 2015
compatibility.php fix isReference() Mar 10, 2017
composer.json removed "replace" section; added myself to authors [skip ci] Oct 25, 2016
cookies.php Add import / export cookies function Mar 31, 2017
default_reporter.php init array Mar 10, 2017
detached.php removed unnecessary return-object-by-reference ampersands Dec 8, 2015
dumper.php made dumper->clipString() multibyte safe, Mar 9, 2017
eclipse.php fixed syntax error Jul 30, 2016
encoding.php cs fixes Dec 2, 2015
errors.php fix method signature of SimpleTestErrorHandler Aug 1, 2016
exceptions.php rename "coerce" to "force" Dec 22, 2016
expectation.php rename "coerce" to "force" Dec 22, 2016
form.php fix wrong param name Aug 1, 2016
frames.php removed explicit assign-object-by-reference ampersands Dec 8, 2015
http.php added referer handling: new method setReferer() on UserAgent, getHead… Nov 30, 2016
invoker.php cs fixes Dec 2, 2015
mock_objects.php Enable Simpletest mocks to manage namespaces Jun 11, 2017
page.php docblock fix: mixed type string|bool Dec 22, 2016
php_parser.php renamed "Selectors" Aug 1, 2016
recorder.php cs fixes Dec 2, 2015
reflection.php refactoring: pull out into method getReturnType() Dec 22, 2016
remote.php cs fixes Dec 2, 2015
reporter.php Using the modern versionless html DOCTYPE: Nov 23, 2016
scorer.php compute the size beforehand, and not on each iteration Jul 31, 2016
selector.php renamed "Selectors" Aug 1, 2016
shell_tester.php fix phpdoc annotations Aug 1, 2016
simpletest.php renamed "reflection_php5.php" to "reflection", changed other files ac… Jul 31, 2016
socket.php prevent closing sockets which are already closed Dec 24, 2016
tag.php rename "coerce" to "force" Dec 22, 2016
test_case.php compare equal (not identical) Mar 10, 2017
tidy_parser.php use strict comparisons Dec 2, 2015
unit_tester.php cleanup assertReference() Mar 10, 2017
url.php cs fixes Dec 2, 2015
user_agent.php Add import / export cookies function Mar 31, 2017
web_tester.php change visibility of browser property, else it's not available in ext… Aug 1, 2016
xml.php renamed "Nesting" to "Nested" to fit the phpdoc annotations :) Aug 1, 2016

SimpleTest Build Status Latest Stable Version Total Downloads Latest Unstable Version

SimpleTest is a framework for unit testing, web site testing and mock objects for PHP.



All downloads are stored on Github Releases.

You may find the zip of the "latest released/tagged version" here:

You may find the zip archive of the "dev-master" branch here:


You may also install the extension through Composer into the /vendor folder of your project.

Either run

php composer.phar require --dev --prefer-dist simpletest/simpletest "^1.1"

or add the package simpletest/simpletest to the require-dev section of your composer.json file:

    "require-dev": {
        "simpletest/simpletest": "^1.1"

followed by running composer install.


Please report all issues you encounter at Github Issues.


Feel free to ask a new question on Stack Overflow or at Github Issues.

StackOverflow offers also a good collection of SimpleTest related questions.


PHP 5.4+





The unit tests for SimpleTest itself can be run here:


The acceptance tests require a running server:

- php -S localhost:8080 -t test/site
- test/acceptance_test.php