![]() |
(08-07-2023, 02:25 AM)kenjis Wrote: Yes, we can test only one request and the response at a time.Thanks @kenjis. I must have discovered a bug in CI4... when run through tests the function in the code being tested uri_string() (and the underlying Services::request()->getPath(); ) somehow omits the last segment of the uri. Same function when used in the test itself returns the full uri... Code in test: PHP Code: $route = route_to('invoice_add'); //(resolves to invoices/add);
==
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
|