![]() |
08-05-2023, 02:41 PM
(This post was last modified: 08-05-2023, 02:49 PM by dgvirtual. Edit Reason: update )
I need to create unit tests for controllers / routes that are only accessible for logged in users. I am using IonAuth.
PHP Code: public function testValidateField() I am using IonAuth for authentication. The login check is performed by a filter. How do I imitate logged in user in this case? How do I log in? I see Shield has AuthenticationTesting trait for that. But how do I deal with IonAuth here? Maybe @benedmunds could suggest something?
==
Donatas G. |
Messages In This Thread |
phpunit testing routes only available after login - by dgvirtual - 08-05-2023, 02:41 PM
RE: phpunit testing routes only available after login - by benedmunds - 08-05-2023, 03:56 PM
RE: phpunit testing routes only available after login - by dgvirtual - 08-06-2023, 02:34 AM
RE: phpunit testing routes only available after login - by dgvirtual - 08-06-2023, 09:55 AM
RE: phpunit testing routes only available after login - by kenjis - 08-05-2023, 05:40 PM
RE: phpunit testing routes only available after login - by dgvirtual - 08-06-2023, 11:57 AM
RE: phpunit testing routes only available after login - by kenjis - 08-06-2023, 05:50 PM
RE: phpunit testing routes only available after login - by dgvirtual - 08-07-2023, 02:03 AM
RE: phpunit testing routes only available after login - by kenjis - 08-07-2023, 02:25 AM
RE: phpunit testing routes only available after login - by dgvirtual - 08-07-2023, 02:57 AM
|