Difference between revisions of "Developer Area/Testing/Unit Testing"

From Mahara Wiki
Jump to navigation Jump to search
(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…")
 
Line 6: Line 6:
 
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.
 
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;
+
* Install phpunit on your development machine; (on ubuntu you may need to follow these instructions https://bugs.launchpad.net/ubuntu/+source/phpunit/+bug/701544/comments/6)
 
* Switch to a user with permission to access your dataroot directory. In debian this would be:
 
* Switch to a user with permission to access your dataroot directory. In debian this would be:
 
   sudo su - www-data
 
   sudo su - www-data

Revision as of 11:50, 8 September 2011

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.

 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