There currently is no test for the "Use absolute path for Breadcrumb links" (ABSOLUTE_PATHS) config.
Issue fork easy_breadcrumb-3615999
Show commands
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
csakiistvan✅ Tested and works — MR !216, with one suggestion below.
Environment
5bfef4e)Prerequisites
2.xbranch inside a Drupal 11.4.4 site.grep -rn ABSOLUTE_PATHS web/modules/contrib/easy_breadcrumb/tests/returns no matches.Steps
tests/src/Functional/EasyBreadcrumbAbsolutePathsTest.php, which enables Use absolute path for Breadcrumb links, visits/admin/structureand asserts the second breadcrumb link points at the absolute URL of/admin.ddev drush crABSOLUTE_PATHScondition insrc/EasyBreadcrumbBuilder.php(line 668) withFALSEso links are never made absolute, 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
ABSOLUTE_PATHS, so the setting was completely uncovered. After applying MR !216 the new test ran green (1 test, 5 assertions; only pre-existing unrelated deprecation notices). With the condition forced toFALSEit failed withBehat\Mink\Exception\ElementNotFoundException: Element matching css "#block-breadcrumb li:nth-child(2) a[href="http://web/admin"]" not found., confirming the assertion is meaningful. Reverting the builder restored a green run.phpcs --standard=Drupal,DrupalPracticereports no issues on the test file.Suggestion: the test only covers the enabled state. Adding the negative half — setting
ABSOLUTE_PATHStoFALSE, reloading and asserting the same link renders as/adminrather than the absolute URL — would pin both directions and match the style of the other config tests in this series.Testing produced with the assistance of an LLM.
Comment #6
greg boggscsakiistvan,
I think, based on the "Suggestion:" part of your test, we should add that test and keep this needs work. What do you think?
Comment #7
csakiistvanGood point Greg, i do this change and move the issue to Needs review
Comment #8
loopduplicate commentedComment #10
loopduplicate commentedThanks @csakiistvan and @greg-boggs :3
Comment #11
loopduplicate commentedComment #13
csakiistvanWelcome loopduplicate :)