-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laminas->createApplication() called too many times #8
Comments
Specifically, these two lines guarantee at least two complete
And then this one gets called after my Cest's
This is probably what the Just seems like too many Connectors, and way too many Applications getting created. |
Comment in line 104 says You may be right that this is not really useful, but it doesn't affect execution of tests. The instance of connector that matters for test is created in |
Hmmm... well if I'm the only one confused, that's fine. Just seems that with many Connectors and/or Applications around, it can be confusing that only a last-minute hook will work if changes are needed to the "real" Application that gets called by the test. The reason this cost me hours is that I could get to a Connector (or Application) from higher-level hooks, so assumed that changing them was going to work. I had no idea that there'd be many Applications init'd. Anyway, thanks for the answer and for the maintenance of this important module! |
I'm trying to override the ServiceManager in my functional tests. I understand this needs to be done in
_beforeStep()
(true?)But in watching Codeception and the Laminas module work, I was surprised at how many times
Laminas->createApplication()
is called.I would expect one fresh application per simulated HTTP request (e.g.
->see()
or->click()
), but there are more than that:Trimmed stack traces:
Is this expected? The two before
_before()
seem unnecessary/unused.The text was updated successfully, but these errors were encountered: