This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/includes/kohana/modules/unittest
2012-10-07 15:30:53 +11:00
..
classes Upgrade to KH 3.1.3.1 2011-07-18 16:20:23 +10:00
config Upgrade to KH 3.1.3.1 2011-07-18 16:20:23 +10:00
guide/unittest Upgrade to KH 3.1.3.1 2011-07-18 16:20:23 +10:00
views/unittest Upgrade to KH 3.1.3.1 2011-07-18 16:20:23 +10:00
bootstrap.php Enabled phpunit, updates for ab_setup, enabled APC, and other todos 2012-10-07 15:30:53 +11:00
example.phpunit.xml Added Kohana v3.0.8 2011-05-03 09:49:01 +10:00
init.php Upgrade to KH 3.1.3.1 2011-07-18 16:20:23 +10:00
README.markdown Upgrade to KH 3.1.3.1 2011-07-18 16:20:23 +10:00
tests.php Upgrade to KH 3.1.3.1 2011-07-18 16:20:23 +10:00

Kohana-PHPUnit integration

This module integrates PHPUnit with Kohana.

If you look through any of the tests provided in this module you'll probably notice all theHorribleCamelCase. I've chosen to do this because it's part of the PHPUnit coding conventions and is required for certain features such as auto documentation.

Requirements

Optional extras

  • The Archive module is required if you want to download code coverage reports from the web ui, however you can also view them without downloading.

Installation

Step 0: Download this module!

To get it from git execute the following command in the root of your project:

$ git submodule add git://github.com/kohana/unittest.git modules/unittest

And watch the gitorious magic...

Of course, you can always download the code from the github project as an archive.

Running the tests

     $ phpunit --bootstrap=modules/unittest/bootstrap.php {tests}

Where {tests} can either be a path to a folder of tests, or a path to the the tests.php (modules/unittest/tests.php)

Please see the guide pages for more info. An example of how we run the tests for the kohana project can be found in the phing build script.

If you're looking for more info on running the core kohana tests then please see our dev wiki