From 7de83e0f751818e943eaf24c0aa7efa72d0f3f7d Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 30 Aug 2015 23:46:06 +0200 Subject: [PATCH] Updated Development (markdown) --- Development.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Development.md b/Development.md index c6ecf37..363cfa4 100644 --- a/Development.md +++ b/Development.md @@ -14,7 +14,7 @@ More details can be found in the [API documentation](https://zerobin.dssr.ch/doc ## Unit Tests -For unit tests of the php code the folder `tst/` should be used. Apart from helping to implement new features correctly it should help us to keep regressions at bay. By default a code coverage report is generated after phpunit is run, the one of the latest release is [publicly available](https://zerobin.dssr.ch/coverage-report/). +For unit tests of the php code the folder `tst/` can be used. Apart from helping to implement new features correctly it helps to keep regressions at bay. By default a code coverage report is generated after phpunit is run, the one of the latest release is [publicly available](https://zerobin.dssr.ch/coverage-report/). In order to run these tests, you will need the following packages and its dependencies: * phpunit @@ -31,6 +31,14 @@ To run the tests, just change into the `tst/` directory and run phpunit: $ cd ZeroBin/tst $ phpunit +Additionally there is the `configGenerator`. Based on the configurations defined in its constructor, it generates the unit test file `tst/configuration.php`, containing all possible combinations of these configurations and test for (most) valid combinations. Some of combinations can't be tested with this method, i.e. a valid option combined with an invalid one. Other very specific test cases (i.e. to trigger multiple errors) are covered in `tst/zerobin.php`. Here is how to generate the configuration test and run it: + + $ cd ZeroBin/tst + $ php configGenerator.php + $ phpunit configuration.php + +Note that it can take an hour or longer to run the several thousand tests. + ## Data Model If you want to create your own data models, you might want to know how the arrays, that you have to store, look like: