This is a followup to #3054185: Test a FillPdfForm's availability in FillPdfLinkManipulator::parseLink() while remaining unit testable.
We may further simplify FillPdfLinkManipulator::parseLink()
and FillPdfLinkManipulator::parseEntityIds()
.
Particularly, in parseLink()
, we don't have to fall back to the 'node' entity type, as parseEntityIds()
will already do so.
Furthermore, when falling back on the defaults, we may simply set entity_type and entity_id. No need to build an entity_ids array.
This, plus some obvious simplifications in parseEntityIds()
.
Also adding another test case, and making sure our tests don't sanitize the input.
Comment | File | Size | Author |
---|---|---|---|
#5 | 3059104_3-5_interdiff.txt | 903 bytes | Pancho |
#5 | fillpdf_refactor_parselink_3059104-5.patch | 4.38 KB | Pancho |
#3 | 3059104_2-3_interdiff.txt | 1.42 KB | Pancho |
#3 | fillpdf_refactor_parselink_3059104-3.patch | 4.33 KB | Pancho |
#2 | fillpdf_refactor_parselink_3059104-2.patch | 3.94 KB | Pancho |
Comments
Comment #2
PanchoComment #3
PanchoFurther simplify
FillPdfLinkManipulator::parseEntityIds()
.Comment #5
PanchoLet's do it this way around to ensure all
$context
keys are set.Comment #7
Pancho