We need to decide how to write tests for the new CORE REST API routes.
- Utilize the new integration testing framework right away.
- Write PHPUnit integration tests for the API.
- Write unit tests for handlers in phpunit.
I think that we want to go with the integration testing framework right away, the question is how ready is it for real life usage?
Unit tests for handlers would be probably pretty hard, cause the API endpoints are fairly high-level and they utilize DB and a lot of services, so if we wanted to create proper unit tests, we'd need to mock a lot of dependencies. I'm not advocating for not doing unit tests, but maybe in the beginning integration tests with the new framework might be easier.
As for writing integration tests in phpunit - that would be an ok way to have some tests if the framework is not ready, but it would be very unfortunate to write tests this way, cause I imagine long term we would want to switch to the integration testing framework anyway