Currently the tests do not pass on Drupal CI even though it works locally.

After a few research I think I found the problem that is the Drupal CI try to request "/subdirectory/admin/config/development" instead of "/admin/config/development".

The problem seems to be the presence of the initial "/" in our tests paths.

I'll try to patch this and remove this initial "/" so see if it's working better.

Comments

Nixou created an issue. See original summary.

nixou’s picture

nixou’s picture

Ok so the problem is that the behavior of the module is not correct when Drupal is installed in a subdirectory.
The tests are launched from a subdirectory precisely to detect this kind of problem.

The problem is that the redirect destination service is used to determine the current url.
If Drupal is installed in a subdirectory, this service will return the full path including the subdirectory and that's where it goes wrong.

So instead of using this service, we can, more logically, use the current path service to retrieve the current url.

nixou’s picture

Title: Tests are in error on Drupal CI » Wrong behavior when Drupal is installed in a subdirectory
Category: Task » Bug report
nixou’s picture

We just need to ensure to keep query string when necessary as it was the case with the redirect destination service.
This was not covered by the existing tests so I created a new one.

nixou’s picture

nixou’s picture

nixou’s picture

Ok all good with the new tests.

  • Nixou committed 74e3e9b on 8.x-1.x
    Issue #3102467 by Nixou: Wrong behavior when Drupal is installed in a...
nixou’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.