membrane-php / membrane-core

Membrane is a general purpose input validation library, supports both PHP Attributes and OpenAPI specifications
Other
1 stars 2 forks source link

Refactored Processor tests to use test doubles #83

Closed charjr closed 1 year ago

charjr commented 1 year ago

Anonymous classes implementing filter and validator interfaces in processor tests have been replaced with mocks instead

Problem When adding new methods to the Validator and Filter interfaces, the Processor tests would explode because their anonymous classes needed to implement the new methods.

Solution This PR replaces the anonymous classes with mocks so they do not need to implement every method being added. Which will save time developing and reduce amount of changes in PR reviews

Merge before #82