As a developer,
I want to write unit tests for my routes/controllers,
so that I'm sure that my routes work as expected and I can create releases with confidence.
- All paths of the backend application are tested with a standard PHPUnit environment.
- Existing Silex routes are converted to Symfony Flex
- index.php and web resources are in a web directory for added security (php and config files should not be accessible via URL)
Currently, the backend application assumes the existence of a web server and has no provisions for generating a request and response object that can be tested. Therefore it would be good to have a similar structure as in the frontend: A Symfony application with routes that call different use cases and egde-to-egde tests for each route.
This story does not have to be implemented all at once, but every time someone touches the code for a specific route. During this phase, the current "Router" (Fundraiser class) and Request construction can be done in the Symfony 404 error handling as a fallback for routes that have not been converted.
A very ease test case for this would be the route /util/status/check