Testing Symfony 4 (+JS)
Use hautelook/AliceBundle bundle to generate real-looking data for your test fixtures, using Faker and Alice.
- Unit Tests: testing of individual units (functions, classes) by supplying input and making sure the output is as expected
- Integration Tests: testing processes across several units (classes) to achieve their goals
- Functional Tests (e2e, end2end tests): testing how scenarios function on the product itself, by controlling the browser/website. Usually ignore internals of the application and looks at app from the outside. Part of functional tests are smoke tests, as the most basic preliminary testing to reveal really simple failures, but severe enough to reject a release.
- Symfony Unit Testing Part 1 - Getting started
- Symfony Unit Testing Part 2 - Test Doubles
- Symfony Unit Testing – With a Database
There is no need to test with MySQL. You could use the faster SQLite. Remember. You are not testing Doctrine. You are testing your application that uses Doctrine. This means we can expect that doctrine queries behave the same in SQLite and MySQL.