jakx

Yep, taking the direct path seems to be the way to go. @blueo your suggestion came in very handy, thank you.

Thanks @madman @firesphere @null @blueo

(1)
blueo

just a thought - middleware could be quite a good option for applying something like this across requests

jakx

I'll give it a go @firesphere, thanks! I appreciate the direction

firesphere

You're better off, for your tests, to do this call with a set of authenticators as per @blueo’s suggestion. Testing if your authenticator has become the default is not your job, that's the job of the framework itself

🤔 (1)
firesphere

You're trying to test if your custom action is hit, Security/login/myaction will attempt to look for the myaction Authenticator, as the actual login request goes through default

firesphere

That still sounds as I said above, testing the framework instead of your custom code

jakx

The test I'm working at now (not the one in the example above) is calling $this->get('Security/login/myaction'), so expecting a specific default authenticator with the available action (to cover the action method)

firesphere

What are you trying to cover with your test? As I said before,you're basically testing default framework functionality, so I'm not sure what the added value is for your goal?

jakx

But yeah, assigning the specific authenticator on the fly for (FunctionalTest) testing is proving a challenge

null

You could make one and open-source it 😄

😁 (1)