phalcon/cphalcon — pull request #1307 by sjinks (2013-09-28 23:17:13+00:00)
Title: More tests + test coverage

In this PR:
* added more regression tests (they were taken from php-tests directory — is it used anywhere?)
* added support for test coverage
* modified build file generator.

The most interesting part is "test coverage".

Now Phalcon can be build with --enable-coverage key, ie

```bash
phpize
./configure --enable-coverage
make
```

This requires `lcov` and `genhtml` programs (`apt-get install lcov` in Debian and Ubuntu).

To get the test coverage, run

```bash
make coverage
```

This will run regression tests, unit tests and then produce test coverage information in `coverage/` directory (open `coverage/index.html` in the browser to view the details).

This is what the report looks like: https://www.diigo.com/item/image/3zdqq/hjpw

This can be useful if someone wants to write more tests as it shows completely grey areas not covered by any tests.