Skip to content

Add (more) unit-tests #21

@Potherca

Description

@Potherca

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions