In the test Drupal\KernelTests\Core\Database\UpdateComplexTest::testUpdateExpression() there are two instances with the use of $GLOBALS['larry_test']. Let use remove them.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

daffie created an issue. See original summary.

krknth’s picture

Status: Needs review » Reviewed & tested by the community

Looks like its fair to remove those global values. Moving it RTBC

xjm’s picture

I confirmed these are the only instances of Larry testing global state from tests:

[ibnsina:drupal | Thu 13:49:21] $ grep -r "larry_test" *
core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php:    $GLOBALS['larry_test'] = 1;
core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php:    $GLOBALS['larry_test'] = 0;

Line has not been changed since #1598568: Convert database.test to PSR-0 and dates to #276276: Tests needed: Database layer. I think it is safe to remove this. ;)

  • xjm committed 3832bf7 on 8.4.x
    Issue #2855267 by daffie: "Larry" should not use $GLOBALS in Drupal\...

  • xjm committed 7a41de5 on 8.3.x
    Issue #2855267 by daffie: "Larry" should not use $GLOBALS in Drupal\...
xjm’s picture

Version: 8.4.x-dev » 8.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to 8.4.x and 8.3.x. Thanks!

Status: Fixed » Closed (fixed)

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