Closed (fixed)
Project:
Taxonomy Term Glossary
Version:
4.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2026 at 22:37 UTC
Updated:
13 Mar 2026 at 13:05 UTC
Jump to comment: Most recent
Comments
Comment #3
mably commentedAdded comprehensive test coverage across the module and its
term_glossary_per_nodesubmodule — 14 files changed, 2055 insertions, 5 deletions.New test files (11)
Kernel tests
TermGlossaryManagerTest— 18 tests for the core service: empty input, invalid UTF-8, basic/multiple term matching, case-sensitive/insensitive, full-word matching with boundary exceptions, single match per field/content, exclude self-reference, ignore tags, link/glossary-exclude class exclusion, handler resolution, config retrieval, term caching.TermGlossaryControllerTest— 6 tests for the JSON API endpoints: letter search (valid/invalid), term-by-ID (found/not found), search-per-term (CONTAINS match/no results).GlossaryAlphabeticalBockTest— 7 tests for the block plugin: default configuration, build output for all threesearch_typevariants, form structure, form default value reflection, submit handler.TermGlossaryPerNodeManagerTest— 5 tests for the per-node service decorator: service override verification, vocabulary resolution with per-node override, formatter third-party settings (active/inactive/non-node entity).Unit tests
TermGlossaryLinkHandlerTest— 1 test for the link handler plugin: term wrapping with link URL, CSS class, and tid in URL options.TermGlossaryCustomJSHandlerTest— 2 tests for the custom JS handler plugin: term wrapping with data attributes and CSS classes, and HTML escaping of term names.TermGlossaryPerNodeHooksTest— 2 tests for per-node hook callbacks:entityBaseFieldInfo()returns fields for node type and empty array for non-node types.TermGlossaryUtilsTest— 6 tests for the utility class: per-node settings retrieval (active/inactive/missing type), vocabulary resolution with/without override.Functional tests
TermGlossaryRenderTest— 2 tests for end-to-end rendering:glos-termmarkup appears when glossary is enabled on a field, absent when disabled.TermGlossaryConfigFormTest— 2 tests for the admin config form: successful submission and access denied for anonymous users.Shared trait
GlossaryTestTrait— extracts duplicated setUp boilerplate (installGlossaryTestDependencies()) and thecreateGlossaryTerm()helper into a reusable trait shared by all 4 kernel tests and the functional render test.Modified files (3)
TermGlossaryPerNodeTest— added detailed PHPDoc descriptions totestNodeFormSettings()andtestDisablingOverride().TermGlossaryHooksTest— added detailed PHPDoc descriptions to all test methods, renamed$resultvariables to$form_elementsfor clarity..cspell-project-words.txt— addedzzzznotfound(used in controller test).Comment #5
mably commented