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
Currently in DeletingFailedException line 52 an error message is created:
We encountered 1 problem while trying to delete the saved models.
This (incorrectly) let me to believe the cleanup failed, possibly because of foreign key constraint violations. It would be more useful to show the actual exception messages as in my case the actual error was:
The EntityManager is closed.
The text was updated successfully, but these errors were encountered:
Just for future reference if anyone hits this via a Google search, to troubleshoot the actual messages:
Make sure the DataFactory module is defined before your ORM module, see snippet below.
If you errors are database constraint violations, enable the Codeception Logger to see the actual error message in your log files (e.g. tests/_output/unit-2020-04-24 for unit tests)
If all else fails, dump the exception messages in vendor/league/factory-muffin/src/Stores/AbstractStore.php
actor: UnitTester
modules:
enabled:
- Symfony:
app_path: 'app'
environment: 'test'
# important, must be defined _before_ Doctrine2 module
- DataFactory:
depends: Doctrine2
- Doctrine2:
depends: Symfony
cleanup: false
Just for future reference if anyone hits this via a Google search, to troubleshoot the actual messages:
* Make sure the DataFactory module is defined **before** your ORM module, see snippet below.
* If you errors are database constraint violations, enable the [Codeception Logger](https://codeception.com/extensions#Logger) to see the actual error message in your log files (e.g. `tests/_output/unit-2020-04-24` for unit tests)
* If all else fails, dump the exception messages in `vendor/league/factory-muffin/src/Stores/AbstractStore.php`
actor: UnitTester
modules:
enabled:
- Symfony:
app_path: 'app'
environment: 'test'
# important, must be defined _before_ Doctrine2 module
- DataFactory:
depends: Doctrine2
- Doctrine2:
depends: Symfony
cleanup: false
Thanks @Liiva This comment should be in the module's documentation!.
Currently in
DeletingFailedException
line 52 an error message is created:This (incorrectly) let me to believe the cleanup failed, possibly because of foreign key constraint violations. It would be more useful to show the actual exception messages as in my case the actual error was:
The text was updated successfully, but these errors were encountered: