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.
phptsmadmin/includes/kohana/modules/unittest/README.markdown

25 lines
943 B
Markdown
Raw Normal View History

2011-01-13 14:49:56 +00: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
* [PHPUnit](http://www.phpunit.de/) >= 3.4
2012-11-22 03:25:06 +00:00
## Usage
2011-01-13 14:49:56 +00:00
2012-11-22 03:25:06 +00:00
$ phpunit --bootstrap=modules/unittest/bootstrap.php modules/unittest/tests.php
2011-01-13 14:49:56 +00:00
2012-11-22 03:25:06 +00:00
Alternatively you can use a `phpunit.xml` to have a more fine grained control
over which tests are included and which files are whitelisted.
2011-01-13 14:49:56 +00:00
2012-11-22 03:25:06 +00:00
Make sure you only whitelist the highest files in the cascading filesystem, else
you could end up with a lot of "class cannot be redefined" errors.
2011-01-13 14:49:56 +00:00
2012-11-22 03:25:06 +00:00
If you use the `tests.php` testsuite loader then it will only whitelist the
highest files. see `config/unittest.php` for details on configuring the
`tests.php` whitelist.