2009-11-10 18:51:31 +01:00
|
|
|
Running SemanticScuttle unit tests
|
|
|
|
==================================
|
2008-02-13 18:34:18 +01:00
|
|
|
|
2009-11-10 18:51:31 +01:00
|
|
|
Prerequisites
|
|
|
|
-------------
|
|
|
|
The unit tests use PHPUnit.
|
|
|
|
For installation instructions, see http://phpunit.de/
|
2008-02-13 18:34:18 +01:00
|
|
|
|
|
|
|
|
2009-11-10 18:51:31 +01:00
|
|
|
Warning
|
|
|
|
-------
|
|
|
|
The unit tests are DESTRUCTIBLE! Never ever run them on your
|
|
|
|
normal SemanticScuttle database! Always use a different database
|
|
|
|
for testing - whole tables are emptied and re-filled during the
|
2010-03-18 20:22:26 +01:00
|
|
|
tests, and you will definitely lose all data in there.
|
2009-11-10 18:51:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
Running the tests
|
|
|
|
-----------------
|
|
|
|
To run a single test class, execute it like a normal php script:
|
|
|
|
php tests/BookmarkTest.php
|
|
|
|
|
|
|
|
To run *all* the tests, run
|
|
|
|
php tests/AllTests.php
|
|
|
|
|
|
|
|
If you want features like code coverage, you need to use
|
|
|
|
the phpunit executable:
|
|
|
|
phpunit --coverage-html /tmp/sc-coverage/ tests/AllTests.php
|