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.
CommentFileSizeAuthor
#1 adapter-refactor-1668484-1.patch12.88 KBcpliakas

Comments

cpliakas’s picture

Assigned: Unassigned » cpliakas
Status: Active » Needs review
StatusFileSize
new12.88 KB

The attached patch refactors the constructor and adds additional tests that can now happen because of the refactoring.

cpliakas’s picture

Status: Needs review » Fixed

Light is green, trap is clean. Committed to the 7.x branches of Facet API.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.