wiki:PHPUnit

PHPUnit

Check the PHPUnit site for general details:  PHPUnit

Check the following blog for some nice posts about how to get started with phpunit:  http://codeutopia.net/blog/2009/06/05/unit-testing-introduction/

Getting started

Look in trunk/test for examples of existing tests. Creating a new test is pretty simple, the first steps are:

# create your test file - it must be named the same as the test class you're making, i.e. making an EntityTests class your file should be named EntityTests.php # in your test file, include 'PHPUnit/Framework.php' # you also need to include 'core_includes.php' from the test directory # write your tests - everything normally available in the framework should be available

Trac ticket

I created a general trac ticket to keep track of changes to this: TM(1228)?