-
Notifications
You must be signed in to change notification settings - Fork 7
Refactoring tests. #43
Copy link
Copy link
Open
Labels
Milestone
Description
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:
- PHPUnit test class to test every data object and interface (Entry, Address, others if i've missed any).
- Utility classes for testing L1 in isolation against all the currently available L2 implementations.
- Utility classes for testing L2 in isolation against all the currently available L1 implementations.
- 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.
Reactions are currently unavailable