Various components should be refactored for better unit testing. Since the logic is jumbled in the __construct() method, it makes it difficult to test as there are no return values to work with. The areas that could be moved into separate methods are the following:
- Getting and setting valid query type for the adapter's enabled facets.
- Loading and setting the URL Processor plugin.
- Initializing the URL Processor plugin by fetching, normalizing, and setting the params.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | adapter-refactor-1668484-1.patch | 12.88 KB | cpliakas |
Comments
Comment #1
cpliakas commentedThe attached patch refactors the constructor and adds additional tests that can now happen because of the refactoring.
Comment #2
cpliakas commentedLight is green, trap is clean. Committed to the 7.x branches of Facet API.