© Sándor Gömöri 2016

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

12. Test Suites

Rādhārādhya Dāsa

(1)Somogyvamos, Hungary

A337704_2_En_12_Figa_HTML.jpg

This suit really suits me

While developing a particular feature, we’ll run certain tests. Before deploying, we should run all our tests, to make sure we haven’t broken something. This is the point at which test suites come into the picture.

Using TestSuite

TestSuite offers a few methods for easily creating test suites, based on the file system.

To create a test suite for all model table tests, we should create a file named AllModelTableTest.php in /tests/TestCase/.

 1  <?php               2  use Cake\TestSuite\TestSuite;               3   ...

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.