Writing an extension for SimpleTest

SimpleTest is coded to be flexible and extensible. It means you can add your own assertions. You can also add your own reporter or any other tool worth your fancy. In fact there's a special directory inside SimpleTest SVN trunk devoted to such kind of experimentations.

Existing extensions

There's a growing list of available extensions:

Committing a new extension

If you want to have your own extension accepted inside the SVN trunk, juste make sure you follow these simple rules:

  1. Main code goes into a file located at
    /extensions/my_new_extension.php
  2. If you need extra stuff (classes, sub-routines, js or css files), make sure everything is located your own
    /extensions/my_new_extension/*
  3. And since your package is unit-tested, your tests go into
    /extensions/my_new_extension/test/*
    or
    /extensions/my_new_extension/*
  4. Bonus : you can get your own test suite caught directly from SimpleTest. There's dedicated test scanning recursively the extensions' directories and running the test file matching /test.php$/. An easy way for us to check if everyone's extension carries on working with the current code base...
Also for general coding practices, you can have a look at the coding standards and formatting.