There currently is no test for the "Use site title as the front page segment" (USE_SITE_TITLE) config.
Issue fork easy_breadcrumb-3615280
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
Prerequisites
2.xbranch inside a Drupal 11.4.4 site.grep -rn USE_SITE_TITLE web/modules/contrib/easy_breadcrumb/tests/returns no matches.Steps
tests/src/Functional/EasyBreadcrumbUseSiteTitleTest.php, a functional test that sets a custom site name and asserts the first breadcrumb segment is Home with Use site title as the front page segment disabled, and the site name once the setting is enabled.ddev drush crsrc/EasyBreadcrumbBuilder.php(around line 708) to always use the configured home segment title, and run the test again.EasyBreadcrumbBuilder.phpand run the test a final time.Expected results
2.x.Actual results
Before the fix no test referenced
USE_SITE_TITLE, so the "Use site title as the front page segment" setting was completely uncovered. After applying MR !204 the new test ran green (1 test, 5 assertions; only pre-existing unrelated deprecation notices). Bypassing the site-title branch made it fail withBehat\Mink\Exception\ElementHtmlException: The string "Test Site Name" was not found in the HTML of the element matching css "#block-breadcrumb li:first-child"., confirming the assertions are meaningful. Reverting the builder restored a green run.Testing produced with the assistance of an LLM.
Comment #7
loopduplicate commentedThanks csakiistvan
Comment #9
csakiistvanWelcome loopduplicate :)