Problem/Motivation
I was working on the issue #3402601 with module Pagerer.
I believe if in PagetTest.php $GLOBALS['base_root']
was not used, we will not have this issue.
There is only 2 files with using this approach, and I believe using \Drupal\Tests\UiHelperTrait::getAbsoluteUrl()
is better.
The problem was that because in Gitlab CI "web" subdrectory is used, we run into issue, having tests failing in Gitlab CI approach.
\Drupal\Tests\UiHelperTrait::getAbsoluteUrl()
used in many tests in core. And there are only 3 places where $GLOBALS['base_root']
used.
Steps to reproduce
?
Proposed resolution
Replace $GLOBALS['base_root']
with \Drupal\Tests\UiHelperTrait::getAbsoluteUrl()
in PhpUnit functional tests.
Remaining tasks
Refactor code.
User interface changes
none
API changes
none
Data model changes
none
Release notes snippet
none
Issue fork drupal-3402618
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
Nikolay ShapovalovMR created. Please let me know what do you think.
Comment #4
mondrakeMakes sense, and a similar fix let tests pass in GitlabCI for the contrib Pagerer module.
Comment #5
alexpottCommitted ed5d89d and pushed to 11.x. Thanks!
Will backport to 10.2.x on Monday.
Comment #7
alexpott