© Sándor Gömöri 2016

Rādhārādhya Dāsa, Learn CakePHP, 10.1007/978-1-4842-1212-7_14

14. Goodies

Rādhārādhya Dāsa

(1)Somogyvamos, Hungary

A337704_2_En_14_Figa_HTML.jpg

There are other yummies

Code Coverage

Code coverage helps you to identify code parts that are not covered by tests. Theoretically, 100% coverage is attainable, but most of the time, you will achieve less than that percentage.

Generating code coverage is simple, like a piece of cake. We can generate coverage for all tests, test suites, or only for test files, with the same options described in the previous chapter.

$ cd ∼/public_html/cakeBlog              $ vendor/bin/phpunit --coverage-html webroot/coverage tests/TestCase/Model/Table/UsersTableTest.php ...

Get Learn CakePHP: With Unit Testing, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.