O'Reilly logo

Learn CakePHP: With Unit Testing, Second Edition by Rādhārādhya Dāsa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required