Setup a basic PHPUnit test environment.

To run all available tests its enough to call

 $ phpunit

from the root workspace directory; the default phpunit configuration
resides in phpunit.xml. A bootstrap script sets some default paths
and can be extended later on with other useful stuff.

Each test class' path should mimic the name and path of the source
class, only that the test class gets an additional "Test" appended so
PHPUnit can find it automatically. The data directory can be used
in a flat manner; for tests that need test data a separate directory
containing these files should be added, and the directory should be
named after the test class itself.

The first test which uses the new infrastructure is a test for the
rewritten diff parser (closes issue 627).
This commit is contained in:
Thomas Keller
2011-03-17 01:12:32 +01:00
parent 19b35565a2
commit 61d7b4a58d
31 changed files with 1621 additions and 0 deletions

View File

@@ -0,0 +1 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:3:{i:0;a:3:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:2:"ls";}i:1;a:3:{i:0;s:0:"";i:1;i:2;i:2;s:2:"ls";}i:2;a:3:{i:0;i:2;i:1;i:3;i:2;b:0;}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:1:{i:0;s:1:"1";}i:1;a:2:{i:0;s:1:"1";i:1;s:1:"2";}}}}}