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:
13
test/data/IDF_DiffTest/test-11-git-add-singleline-file.diff
Normal file
13
test/data/IDF_DiffTest/test-11-git-add-singleline-file.diff
Normal file
@@ -0,0 +1,13 @@
|
||||
commit c28f1dd026dd832398d699fa1fee0cce0562f350
|
||||
Author: Patrick Georgi <patrick@georgi-clan.de>
|
||||
Date: Wed Mar 16 15:14:41 2011 +0100
|
||||
|
||||
foo
|
||||
|
||||
diff --git a/a b/a
|
||||
new file mode 100644
|
||||
index 0000000..8baef1b
|
||||
--- /dev/null
|
||||
+++ b/a
|
||||
@@ -0,0 +1 @@
|
||||
+abc
|
||||
Reference in New Issue
Block a user