Tests
Throughout the development process, Epigraf code is tested in two ways:
- Backend tests call endpoints and test whether the output matches the expectations. This tests model, view, and controllers of the backend at the same. In contrast, unit tests are performed by the same method as integration tests, but check the functionality of specific model and utility classes. Unit tests compare function outputs (and database content modified by functions) with the expected results.
- Acceptance tests check the appearance and interactivity of the frontend by performing actions in a real browser. This includes testing the backend code since the frontend is generated by the backend.
All tests are written using PHPUnit and Codeception and besides asserting specific outputs compare the Epigraf behaviour with reference data snapshots and reference screenshots.