Open Liiva opened 6 years ago
Just for future reference if anyone hits this via a Google search, to troubleshoot the actual messages:
tests/_output/unit-2020-04-24
for unit tests)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: