Add tests of $base_url in UiHelperTrait

Created on 8 September 2023, almost 2 years ago

Problem/Motivation

Add additional, explicit, test coverage to UiHelperTrait to ensure that it works with different values for $base_url.

from catch in #2986962-31: BrowserTestBase::drupalGet() does not appear to be handling base url properly

There is already existing implicit test coverage, therefor I am setting this it minor.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component
PHPUnit 

Last updated about 3 hours ago

Created by

🇳🇿New Zealand quietone

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @quietone
  • 🇮🇳India virag.jain

    virag.jain made their first commit to this issue’s fork.

  • 🇮🇳India virag.jain

    I'd like to contribute by adding explicit test coverage for UiHelperTrait’s handling of $base_url. Before proceeding, I’d appreciate some clarification to ensure alignment with expectations.

    Should the tests be placed in a new class (e.g., UiHelperTraitBaseUrlTest extending BrowserTestBase) or added to UiHelperTrait existing one? Also, should the focus be on all relevant methods (buildUrl(), getAbsoluteUrl(), drupalGet(), and base path stripping logic), or just a subset?

    Lastly, since this issue was originally raised in #2986962 around drupalGet() not handling base URLs correctly, should tests specifically verify that scenario, or more broadly validate the trait's overall handling?

    Happy to begin implementation with your guidance. Thanks!

Production build 0.71.5 2024