test: unit tests for pure JsonLdBuilder methods (#33 partial) #113
Reference in New Issue
Block a user
Delete Branch "test/jsonld-unit-33"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Partial progress on #33 — adds unit tests for the JsonLdBuilder helpers that are pure (no
Factory/Uri/DB) and therefore run under the existing minimal bootstrap.JsonLdBuilderLocalBusinessTest—buildLocalBusiness(): null without name, minimal schema omits optional keys, custom@type+ partial address, geo only when both coordinates present.JsonLdScriptTagTest—toScriptTag(): wraps inapplication/ld+json, rewrites</→<\/(XSS breakout prevention), and produces valid JSON after unescaping.Note
Assertions were derived directly from the implementations and
php -lis clean, but I could not run PHPUnit locally (novendor/). Please let the CItestjob confirm green before merging.The remaining #33 targets (ImageHelper resize/validate, BatchController extract*, CSV import parsing, content/system plugin integration round-trips) require a Joomla test harness with DB/app mocking and are out of scope for this pure-unit pass — leaving #33 open.
Refs #33.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.