![]() |
08-06-2023, 02:34 AM
(This post was last modified: 08-06-2023, 02:37 AM by dgvirtual. Edit Reason: code correction ) (08-05-2023, 03:56 PM)benedmunds Wrote: There’s not a great way. IonAuth really wasn’t the most testable bit of code since testing wasn’t big in CodeIgniter when it was originally written. I use IonAuth as a service, defined in my Config/Services.php, here is the method that defines the service: PHP Code: public static function ionAuth($getShared = true) With some help (and much misdirection) from Google Bard I came up with this thing that works: PHP Code: public function testValidateField() Hope this will be useful for someone. Thanks @benedmunds and @kenjis for helping me reason through this.
==
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
|