-
Notifications
You must be signed in to change notification settings - Fork 2
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
Doctrine2 module and option cleanup does not work #25
Comments
You experience this issue because the Doctrine service is persisted between tests in a cest. It is the default behaviour. You need to make helper method for cleaning the db between tests and call it in _after(). Please see example solution in Codeception/Codeception#2042 (comment). I'll prepare an update for Doctrine2 module to include that functionality as it may be widely used in tests. |
Thanks @vyarmolenko will be waiting for your PR! |
Hey, I have recently ran into this issue, but differently. The thing is, the problem only occurred for me with this config: actor: FunctionalTester
modules:
enabled:
- Symfony:
app_path: 'app'
var_path: 'var'
environment: 'test'
- Doctrine2:
depends: Symfony2
- \Helper\Functional Switching the dependent module for |
I have a functional cest test.
In __before() I create some entities and I assume they will be deleted during __after(), but it does not happen.
I dig a little and found that in
Codeception\Module\Doctrine2
line 174 there is a PDO exception says "There is no active transaction". And when my second test is ran I entities from first test are still existThe text was updated successfully, but these errors were encountered: