There currently is no test for the "Include the front page as a segment in the breadcrumb" (INCLUDE_HOME_SEGMENT) config.
Issue fork easy_breadcrumb-3614760
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
csakiistvanEnvironment
c68c5f0, MR !198)Prerequisites
Steps
tests/src/Functional/EasyBreadcrumbIncludeHomeSegmentTest.php, which places the breadcrumb block, toggles the Include the front page as a segment in the breadcrumb setting on and off, and asserts the first breadcrumb segment on/admin./admin/config/user-interface/easy-breadcrumb, then visit/adminand observe the breadcrumb./adminand observe the breadcrumb again.src/EasyBreadcrumbBuilder.phpand re-run the test, then restore the file.Expected results
2.xbranch./adminstarts with the Home segment; with it disabled, the first segment is Administration.Actual results
The test does what it says. On the unmodified
2.xbranch it passes: 1 test, 6 assertions. The four reported deprecations are unrelated to this issue — they come from other contrib modules installed on the test site (paragraphs_module_implements_alterwithout the#[LegacyModuleImplementsAlter]attribute,Drupal\quick_node_clone\EventSubscriber\AddressEventSubscriber::getSubscribedEvents()) and from core/Twig itself.phpcswith theDrupalandDrupalPracticestandards reports no violations on the new file. In the browser the asserted behaviour matches: with Include the front page as a segment in the breadcrumb enabled the breadcrumb on/adminrenders as Home › Administration, and with it disabled only the unlinked Administration segment remains. The test is also genuinely sensitive to the configuration: inverting theINCLUDE_HOME_SEGMENTcondition insrc/EasyBreadcrumbBuilder.php(line 701) makes it fail on the first assertion (1 failure, 5 assertions), and it passes again once the file is restored. The new test covers only the/adminpath with default values for the related settings (HOME_SEGMENT_TITLE,USE_SITE_TITLE,HIDE_SINGLE_HOME_ITEM), which is consistent with the scope stated in the issue.Note that the breadcrumb block is not visible in the Gin admin theme when core's Navigation module is enabled, so the manual verification was done with Claro as the admin theme. This does not affect the test, which runs on Stark.
Testing produced with the assistance of an LLM.
Comment #7
loopduplicate commentedThanks @csakiistvan :3
Comment #9
csakiistvan@loopduplicate Welcome :)