Allow WebAssert to ignore the site's base path

Created on 2 November 2023, 12 months ago
Updated 25 November 2023, 11 months ago

Problem/Motivation

Using WebAssert::addressEquals is really handy to assert that a given action has landed a user on a given page. However, it's not compatible with the site being installed in a subdirectory and using core's Url class.

E.g I wanted to use $this->assertSession()->addressEquals($media->toUrl('version-history')->toString()); in Add Media revision UI Fixed but that failed because of the /subdirectory/ part. https://git.drupalcode.org/project/drupal/-/merge_requests/4057/diffs?co...

See failures in https://git.drupalcode.org/issue/drupal-2911977/-/pipelines/43052/test_r... for testRevisionDelete and testRevisionRevert

Feature request
Status

Active

Version

11.0 🔥

Component
PHPUnit 

Last updated 1 day ago

Created by

🇦🇺Australia acbramley

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

Comments & Activities

Production build 0.71.5 2024