Problem/Motivation

\Drupal\Tests\system\Functional\Update\UpdateScriptTest::testExtensionCompatibilityChange() visits update.php twice - by calling assertUpdateWithNoError() twice. The first time it sets a session variable update_ignore_warnings so the next time we ignore the warning causing the code in \Drupal\Tests\RequirementsPageTrait::updateRequirementsProblem() to fail.

Proposed resolution

Only try to click on try again if this link exists.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Potentially we should make this change on all branches...

dww’s picture

Component: update.module » database update system

This has nothing to do with Update Manager (update.module), these tests are for update.php (database update system). Moving to the right component.

Never looked at this test before, but the fix seems okay on a quick glance. I'm a little head-scratchy about a conditional in the test like this. Also not clear from an initial review what any of this has to do with PHP5. Can't really RTBC (yet), but I see no reason to NW, either. /shrug

Cheers,
-Derek

xjm’s picture

Status: Needs review » Reviewed & tested by the community

Ah yep, that would do it.

I'm going to commit this straight from NR since HEAD is broken. ...Once PHP 5.5 is done running...

  • xjm committed 0a5e29b on 9.1.x
    Issue #3122742 by alexpott: Fix PHP 5 tests on 8.7.x
    

  • xjm committed 2f1ac15 on 9.0.x
    Issue #3122742 by alexpott: Fix PHP 5 tests on 8.7.x
    
    (cherry picked...

  • xjm committed 225d565 on 8.9.x
    Issue #3122742 by alexpott: Fix PHP 5 tests on 8.7.x
    
    (cherry picked...

  • xjm committed 0e4de7c on 8.8.x
    Issue #3122742 by alexpott: Fix PHP 5 tests on 8.7.x
    
    (cherry picked...

  • xjm committed f4913a1 on 8.7.x
    Issue #3122742 by alexpott: Fix PHP 5 tests on 8.7.x
    
    (cherry picked...
xjm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to... 9.1.x, 9.0.x, 8.9.x, 8.8.x, and 8.7.x. Thanks!

xjm’s picture

Oh, @dww, on 8.7 when we were phasing out PHP 5 support, there was a requirements warning screen that the user had to click past notifying them that PHP 7 would be required starting with the next minor. This warning doesn't exist on 8.8+ because we dropped PHP 5 support completely in 8.8.

The patched method is a helper method (not a test method) that clicks past the requirements warnings when it's presented, because we have no way to independently test the next screen of the update.php UI (since it's a separate front controller with $stuff that happens based on a POST submission). The test will either see or not see the warning depending on the test environment. The warning is expected and correct on PHP 5 environments, but not on PHP 7 ones.

Status: Fixed » Closed (fixed)

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