Closed (fixed)
Project:
Easy Breadcrumb
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2026 at 22:01 UTC
Updated:
26 Aug 2026 at 22:20 UTC
Jump to comment: Most recent
There currently is no test for the "Truncate the page's title to a maximum number" (TRUNCATOR_MODE) config.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
loopduplicate commentedComment #4
csakiistvanComment #5
csakiistvanEnvironment
5bfef4e)Prerequisites
2.xbranch inside a Drupal 11.4.4 site.grep -rn TRUNCATOR_MODE web/modules/contrib/easy_breadcrumb/tests/returns no matches.Steps
tests/src/Functional/EasyBreadcrumbTruncatorModeTest.php, a functional test that creates a node titled Page With Long Title, enables Truncate the page's title to a maximum number with a length of 8, and asserts the segment readsPage ..., thenPage Witafter disabling the trailing dots.ddev drush crTRUNCATOR_MODEconditions insrc/EasyBreadcrumbBuilder.php(lines 586 and 656) withFALSEso truncation never happens, and run the test again.src/EasyBreadcrumbBuilder.phpand run the test a final time.Expected results
2.x.Actual results
Before the fix no test referenced
TRUNCATOR_MODE, so the "Truncate the page's title to a maximum number" setting was completely uncovered. After applying MR !220 the new test ran green (1 test, 8 assertions; only pre-existing unrelated deprecation notices). With both truncation conditions forced toFALSEit failed withBehat\Mink\Exception\ElementHtmlException: The string "Page ..." was not found in the HTML of the element matching css "#block-breadcrumb li:nth-child(2)", confirming the assertions are meaningful; the closingelementNotContainson the full title also guards against the untruncated value. Reverting the builder restored a green run.phpcs --standard=Drupal,DrupalPracticereports no issues on the test file.Testing produced with the assistance of an LLM.
Comment #6
loopduplicate commentedlol, @csakiistvan. Wrong issue! Do I need to search the flag issue queue to find the review for this? Just kidding :3
Comment #7
csakiistvanSorry sorry sorry @loopduplicate, previous comment updated 🙈
Comment #8
loopduplicate commentedthanks :3 will get it merged in soon
Comment #10
greg boggsLooks perfect.
Comment #11
loopduplicate commentedThanks @csakiistvan
Comment #13
loopduplicate commentednice, thanks @greg for reviewing too. I updated the contrib record.