Skip to content

Refactoring tests. #43

@ndobromirov

Description

@ndobromirov

The current tests cover everything in 1 file. This include pure unit tests for all classes and integration tests for checking whether all of them actually work together. This is already close to 1000 lines of code.

It would be nice to have this separated, following the single responsibility OO principle. So there should be:

  1. PHPUnit test class to test every data object and interface (Entry, Address, others if i've missed any).
  2. Utility classes for testing L1 in isolation against all the currently available L2 implementations.
  3. Utility classes for testing L2 in isolation against all the currently available L1 implementations.
  4. Integration test base (or a trait) that will test interoperability of a given L1 + L2 interoperability to reduce code duplication in 2 and/or 3.

This way adding a new L1 for example would be to create L1 implementation class and a test class, following TDD and improving maintainability.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions