-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Before we finalise the move to drupal.org, we want to make sure the phpunit tests are passing for Drupal 10 (previous major).
On localgov_services we have some interesting test failures, which @tonypaulbarker, @andybroomfield and I were looking at yesterday.
For example, see https://git.drupalcode.org/project/localgov_services/-/jobs/6831419#L80
We seem to be getting some interesting behaviour where /web is being added multiple times to redirections and paths.
See
It looks like all tests on drupal.org end up running in http://localhost/web/, which is interesting. I couldn't find any documentation about this or if it has implications for how we need to write tests. @andybroomfield suggested that if we need to account for Drupal being installed in a sub-directory, maybe we need to get and set paths with this in mind.
The first test failure was this:
1) Drupal\Tests\localgov_services_navigation\FunctionalJavascript\LandingPageChildrenTest::testServiceLandingPageLink
Behat\Mink\Exception\ExpectationException: The field "edit-localgov-common-tasks-1-uri" value is "/web/foo", but "/foo" expected.
/builds/project/localgov_services/vendor/behat/mink/src/WebAssert.php:888
/builds/project/localgov_services/vendor/behat/mink/src/WebAssert.php:781
/builds/project/localgov_services/web/core/tests/Drupal/Tests/WebAssert.php:991
/builds/project/localgov_services/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php:149
/builds/project/localgov_services/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
@andybroomfield your suggestion to grab the path with $child[2]->toUrl()->toString() worked ! :)
So maybe all these test failures are related to Drupal living in a sub-directory of /web on drupal.org and we need to accommodate this in our tests?
Copying @stephen-cox @ekes @millnut @Adnan-cds for info and incase anyone else has intel to share on this front!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status