Actions

Developer Area/Testing/Unit Testing

From Mahara Wiki

< Developer Area‎ | Testing
Revision as of 04:46, 2 August 2011 by Andrewnicols (talk | contribs) (Created page with "= Unit Test Introduction = Work is currently underway to integrate phpunit unit testing in to Mahara. Documentation for phpunit is available at http://www.phpunit.de/manual/curre…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Unit Test Introduction

Work is currently underway to integrate phpunit unit testing in to Mahara. Documentation for phpunit is available at http://www.phpunit.de/manual/current/en/

Setup and Running

You'll need to already have mahara set up and installed. Default settings are copied from your running configuration and overridden with unit test settings.

  • Install phpunit on your development machine;
  • Switch to a user with permission to access your dataroot directory. In debian this would be:
 sudo su - www-data
  • Change directory to the root of the mahara git tree (the directory that htdocs is in)
 cd $path_to_mahara
  • Run phpunit:
 phpunit .

Best Practices

TODO