Problem/Motivation

https://git.drupalcode.org/project/drupal/-/jobs/11170680

Wondering if it's the > getting HTML encoded.

  
    
    Time: 00:04.331, Memory: 16.00 MB
    
    Kernel Test Http Request (Drupal\KernelTests\KernelTestHttpRequest)
     ✔ Request
     ✔ Click link
     ✘ Kernel test route
       ┐
       ├ Behat\Mink\Exception\ExpectationException: The string "Oo.">&b3" was not found anywhere in the HTML response of the current page.
       │
       │ /builds/vendor/behat/mink/src/WebAssert.php:888
       │ /builds/vendor/behat/mink/src/WebAssert.php:363
       │ /builds/core/tests/Drupal/Tests/WebAssert.php:569
       │ /builds/core/tests/Drupal/Tests/WebAssert.php:557
       │ /builds/core/tests/Drupal/KernelTests/KernelTestHttpRequestTest.php:113
       ┴
    

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3613247

Command icon 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

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs review

Other way round - the test is looking for an escaped string but #markup doesn't get escaped. This might be it.

catch’s picture

Issue tags: +Random test failure

OK was right the first time, needs ::randomMachineName(), either that or I'm missing something.

https://git.drupalcode.org/project/drupal/-/jobs/11171164

godotislate’s picture

Status: Needs review » Reviewed & tested by the community

Sigh, this is my bad because I though random string would demonstrate the functionality than a static string. But machine name is good.

  • catch committed d4be7daf on 11.x
    fix: #3613247 [random test failure] KernelTestHttpRequest route testing...

  • catch committed 86ddf650 on main
    fix: #3613247 [random test failure] KernelTestHttpRequest route testing...
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Going ahead and committing my own MR here because this is pretty frequent and test-only, and reverting would re-introduce the previous random test failure.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.