You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm observing that with cleanup: true, running external commands with $I->runShellCommand('php bin/console ...'); isn't working. I'm guessing this is due to the transaction, which prevents external processes to "see" the database contents created/modified by the test. Can you confirm this?
If so, I would suggest to change the recommendation at https://codeception.com/docs/modules/Doctrine to cleanup: false, and show people how to load their fixtures in function _before():
IMO the currently recommended way to cleanup after each test doesn't work out, since for some tests it's necessary to disable the transaction (see above) - which ultimately leads to a mess.
So I'm figuring the best approach would be to just reload the fixtures before each test.
What do you think? How do you handle that?
The text was updated successfully, but these errors were encountered:
I'm observing that with
cleanup: true
, running external commands with$I->runShellCommand('php bin/console ...');
isn't working. I'm guessing this is due to the transaction, which prevents external processes to "see" the database contents created/modified by the test. Can you confirm this?If so, I would suggest to change the recommendation at https://codeception.com/docs/modules/Doctrine to
cleanup: false
, and show people how to load their fixtures infunction _before()
:IMO the currently recommended way to cleanup after each test doesn't work out, since for some tests it's necessary to disable the transaction (see above) - which ultimately leads to a mess.
So I'm figuring the best approach would be to just reload the fixtures before each test.
What do you think? How do you handle that?
The text was updated successfully, but these errors were encountered: