Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Unit testing, mock objects and web testing framework for PHP built around test cases.

branch: master

Minor

latest commit 5d4b3f9f90
lastcraft authored April 06, 2010
Octocat-spinner-32 docs Working on docs for next release March 29, 2010
Octocat-spinner-32 extensions Moving recorder from extensions to core March 28, 2010
Octocat-spinner-32 packages
Octocat-spinner-32 test
Octocat-spinner-32 tutorials Building the version 1 February 26, 2005
Octocat-spinner-32 HELP_MY_TESTS_DONT_WORK_ANYMORE Moving recoreder from extensions to core March 28, 2010
Octocat-spinner-32 LICENSE License change September 11, 2006
Octocat-spinner-32 README Ticking stuff off the TODO list December 20, 2008
Octocat-spinner-32 TODO.xml Marking all elements for 1.1beta as done February 13, 2009
Octocat-spinner-32 VERSION
Octocat-spinner-32 arguments.php
Octocat-spinner-32 authentication.php Removing some underscores removed from protected & private properties April 26, 2008
Octocat-spinner-32 autorun.php Bugfix: autorun should set the exit status to 0 if tests pass. July 02, 2009
Octocat-spinner-32 browser.php Fixed textarea glitch with Tidy parser. Tidy parser now default December 13, 2009
Octocat-spinner-32 collector.php Removing some underscores removed from protected & private properties April 26, 2008
Octocat-spinner-32 compatibility.php IdenticalExpectation now includes coparisons on private members July 29, 2009
Octocat-spinner-32 cookies.php Removing some underscores removed from protected & private properties April 26, 2008
Octocat-spinner-32 default_reporter.php Minor April 06, 2010
Octocat-spinner-32 detached.php Removing some underscores removed from protected & private properties April 26, 2008
Octocat-spinner-32 dumper.php Fix typo bug in dumper July 29, 2009
Octocat-spinner-32 eclipse.php Yet again, another batch of underscores removed from protected & priv… April 26, 2008
Octocat-spinner-32 encoding.php adding put and delete methods to SimpleBrowser with additional tests October 13, 2009
Octocat-spinner-32 errors.php
Octocat-spinner-32 exceptions.php Added ability to ignore irrelevant exceptions left over at the end of… July 01, 2009
Octocat-spinner-32 expectation.php
Octocat-spinner-32 form.php Get the rest of form parsing working, inputs, labels, selects July 30, 2009
Octocat-spinner-32 frames.php Removing some underscores removed from protected & private properties April 26, 2008
Octocat-spinner-32 http.php
Octocat-spinner-32 invoker.php Another batch of underscores removed from protected & private properties April 26, 2008
Octocat-spinner-32 mock_objects.php Working on docs December 22, 2009
Octocat-spinner-32 page.php Small performance optimisation to normalise() function. Its called a … August 05, 2009
Octocat-spinner-32 php_parser.php Put in setting switch on simpletest to allow parser selection. July 31, 2009
Octocat-spinner-32 recorder.php Moving recoreder from extensions to core March 28, 2010
Octocat-spinner-32 reflection_php4.php Ran tab2space. If someone turns around and says, "No, we actually use… March 02, 2008
Octocat-spinner-32 reflection_php5.php
Octocat-spinner-32 remote.php
Octocat-spinner-32 reporter.php Minor April 06, 2010
Octocat-spinner-32 scorer.php Moving recoreder from extensions to core March 28, 2010
Octocat-spinner-32 selector.php Yet another batch of underscores removed from protected & private pro… April 26, 2008
Octocat-spinner-32 shell_tester.php Yet another batch of underscores removed from protected & private pro… April 26, 2008
Octocat-spinner-32 simpletest.php Minor tidy ups April 03, 2010
Octocat-spinner-32 socket.php updates to docblocks for phpDocumentor September 20, 2009
Octocat-spinner-32 tag.php Option values now have tags stripped, more closely mirroring browser … July 31, 2009
Octocat-spinner-32 test_case.php fixing typo in globals reference (SF bug #2881793) October 19, 2009
Octocat-spinner-32 tidy_parser.php Fixed textarea glitch with Tidy parser. Tidy parser now default December 13, 2009
Octocat-spinner-32 unit_tester.php Added ability to ignore irrelevant exceptions left over at the end of… July 01, 2009
Octocat-spinner-32 url.php
Octocat-spinner-32 user_agent.php Yet again, another batch of underscores removed from protected & priv… April 26, 2008
Octocat-spinner-32 web_tester.php adding optional content_type parameter to post and put methods, enabl… October 14, 2009
Octocat-spinner-32 xml.php Yet again, another batch of underscores removed from protected & priv… April 26, 2008
README
SimpleTest
==========

You probably got this package from:

    http://simpletest.org/en/download.html

If there is no licence agreement with this package please download
a version from the location above. You must read and accept that
licence to use this software. The file is titled simply LICENSE.

What is it? It's a framework for unit testing, web site testing and
mock objects for PHP 5.0.5+.

If you have used JUnit, you will find this PHP unit testing version very
similar. Also included is a mock objects and server stubs generator.
The stubs can have return values set for different arguments, can have
sequences set also by arguments and can return items by reference.
The mocks inherit all of this functionality and can also have
expectations set, again in sequences and for different arguments.

A web tester similar in concept to JWebUnit is also included. There is no
JavaScript or tables support, but forms, authentication, cookies and
frames are handled.

You can see a release schedule at http://simpletest.org/en/overview.html
which is also copied to the documentation folder with this release.
A full PHPDocumenter API documentation exists at
http://simpletest.org/api/.

The user interface is minimal in the extreme, but a lot of information 
flows from the test suite. After version 1.0 we will release a better 
web UI, but we are leaving XUL and GTK versions to volunteers as 
everybody has their own opinion on a good GUI, and we don't want to 
discourage development by shipping one with the toolkit. You can 
download an Eclipse plug-in separately. 

The unit tests for SimpleTest itself can be run here:

    test/unit_tests.php

And tests involving live network connections as well are here:

    test/all_tests.php

The full tests will typically overrun the 8Mb limit often allowed
to a PHP process. A workaround is to run the tests on the command
with a custom php.ini file or with the switch -dmemory_limit=-1
if you do not have access to your server version.

The full tests read some test data from simpletest.org. If the site
is down or has been modified for a later version then you will get
spurious errors. A unit_tests.php failure on the other hand would be
very serious. Please notify us if you find one.

Even if all of the tests run please verify that your existing test suites
also function as expected. The file:

    HELP_MY_TESTS_DONT_WORK_ANYMORE

...contains information on interface changes. It also points out
deprecated interfaces, so you should read this even if all of
your current tests appear to run.

There is a documentation folder which contains the core reference information
in English and French, although this information is fairly basic.
You can find a tutorial on...

    http://simpletest.org/en/first_test_tutorial.html

...to get you started and this material will eventually become included
with the project documentation. A French translation exists at:

    http://simpletest.org/fr/first_test_tutorial.html

If you download and use, and possibly even extend this tool, please let us
know. Any feedback, even bad, is always welcome and we will work to get
your suggestions into the next release. Ideally please send your
comments to:

    simpletest-support@lists.sourceforge.net

...so that others can read them too. We usually try to respond within 48
hours.

There is no change log except at Sourceforge. You can visit the
release notes to see the completed TODO list after each cycle and also the
status of any bugs, but if the bug is recent then it will be fixed in SVN only.
The SVN check-ins always have all the tests passing and so SVN snapshots should
be pretty usable, although the code may not look so good internally.

Oh, and one last thing: SimpleTest is called "Simple" because it should 
be simple to use. We intend to add a complete set of tools for a test 
first and "test as you code" type of development. "Simple" does not mean 
"Lite" in this context. 

Thanks to everyone who has sent comments and offered suggestions. They
really are invaluable, but sadly you are too many to mention in full.
Thanks to all on the advanced PHP forum on SitePoint, especially Harry
Fuecks. Early adopters are always an inspiration.

 -- Marcus Baker, Jason Sweat, Travis Swicegood, Perrick Penet and Edward Z. Yang.
Something went wrong with that request. Please try again.