© Sándor Gömöri 2016

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

11. Controller Tests 2

Rādhārādhya Dāsa

(1)Somogyvamos, Hungary

A337704_2_En_11_Figa_HTML.jpg

I feel some tension here

Testing with Authentication

There is a good chance that you will use authentication in your controllers. Authentication will not be introduced now, so I will not explain the related code in detail. In our blog, anyone can edit and delete anything, even without being logged in. Authentication is the way to let the user log in and to distinguish between logged-in and not-logged-in users. Authorization is the way to handle permissions, such that admins can edit all posts, but a user ...

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.