habitat
habitat copied to clipboard
Application tests
Application tests that use an in-memory sqlite database and automatically populate the database with test fixtures creating scenarios. I ran into some issues getting the schema created automatically.
I'm thinking that Cypress might be a good option for this now. I was originally going to use Symfony's application tests, but Cypress might be more robust and feature rich due to wider usage.
I think it will be possible to reset the database with cypress with something like:
Cypress.Commands.add('resetDatabase', () => {
cy.exec('docker exec habitat-apache-php php bin/console doctrine:fixtures:load --no-interaction', { failOnNonZeroExit: false });
});
There's good enough coverage on this one for me to say that this is achieved now.