-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Because of the nature of this project, there is only one Server class, which contains all logic.
Likewise, there is also only one class entrypoint: respondToRequest.
Tests should be broken out into separate request methods (GET, PUT, DELETE, POST, etc.).
Although the main components are injected into the class (which makes it possible to mock them) this is not the case for all dependencies. There are still some new ...() calls in the class.
the majority of the tests should exists out of creating a specific setup (both in the Request object passed to the server and various mocks) and and an assert for the returned Response object.
As there are many paths through the code, a lot of tests will be needed to cover them all.
Fixtures that could be used by the mocks already exists, as they have been created for the example.php.