How to test filters are active on route? |
Upgraded to 4.1.3 just to be able to start adding tests to my project but fails miserably on the first hurdle.
I have many, many routes configured (~100) and most of them require a JWT token with specific privileges. When trying the steps from https://codeigniter.com/user_guide/testi...er-testing I get nothing in return from any of the routes tested. I know there are filters defined because they run with the requests coming in normally. In my test: PHP Code: public function testFiltersForAdminRoutes() { In my Config/Routes.php PHP Code: $routes->group('companies', ['filter' => 'bearer-auth:comp'], function($routes) { What gets me puzzled is this line from the description of Filter Testing: Quote:$filtersConfig The default Config\Filters configuration (note: discovery is handle by Filters so this will not include module aliases) All filters I have designed are aliases defined in Config/Filters.php - can I not do that? I am trying to make sure the correct filters are executed based on the route - is that not possible? Any help greatly appreciated! /Mattias |
Welcome Guest, Not a member yet? Register Sign In |