© Sándor Gömöri 2016

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

7. Fixtures

Rādhārādhya Dāsa

(1)Somogyvamos, Hungary

A337704_2_En_7_Figa_HTML.jpg

Felix always felt he was a little bit different

Most of the time, an application will manipulate data. Users will add new posts and comments or edit them, admins will create new tags and categories, etc. Fixtures are sample data generated for test cases. Why do we need them? Playing with application data is a bad idea. We could accidentally delete or modify data during development. We could also break database relations. Not a good idea. Fixtures are another layer of isolation. A smaller and cleaner data set helps ...

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.