Fix failing test in Drupal 10.4.x

Created on 15 July 2024, about 1 year ago

Tests passing with Drupal previous major, previous minor, current and next major but next minor(i.e. Drupal 10.4.x).
As part of this ticket, fix below failing tests:

Testing Drupal\Tests\jsonapi_menu_items\Functional\JsonapiMenuItemsTest
    .FFFFFF                                                             7 / 7
    (100%)
    
    Time: 00:30.410, Memory: 4.00 MB
    
    There were 6 failures:
    
    1)
    Drupal\Tests\jsonapi_menu_items\Functional\JsonapiMenuItemsTest::testParametersNoResults
    'url.query_args:filter' is present in the X-Drupal-Cache-Contexts header.
    Failed asserting that false is true.
    
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:61
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:126
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    
    2)
    Drupal\Tests\jsonapi_menu_items\Functional\JsonapiMenuItemsTest::testParametersParents
    'url.query_args:filter' is present in the X-Drupal-Cache-Contexts header.
    Failed asserting that false is true.
    
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:61
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:147
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    
    3)
    Drupal\Tests\jsonapi_menu_items\Functional\JsonapiMenuItemsTest::testParametersParent
    'url.query_args:filter' is present in the X-Drupal-Cache-Contexts header.
    Failed asserting that false is true.
    
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:61
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:189
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    
    4)
    Drupal\Tests\jsonapi_menu_items\Functional\JsonapiMenuItemsTest::testParametersMinDepth
    'url.query_args:filter' is present in the X-Drupal-Cache-Contexts header.
    Failed asserting that false is true.
    
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:61
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:218
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    
    5)
    Drupal\Tests\jsonapi_menu_items\Functional\JsonapiMenuItemsTest::testParametersMaxDepth
    'url.query_args:filter' is present in the X-Drupal-Cache-Contexts header.
    Failed asserting that false is true.
    
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:61
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:257
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    
    6)
    Drupal\Tests\jsonapi_menu_items\Functional\JsonapiMenuItemsTest::testParametersConditions
    'url.query_args:filter' is present in the X-Drupal-Cache-Contexts header.
    Failed asserting that false is true.
    
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:61
    /builds/issue/jsonapi_menu_items-3451149/tests/src/Functional/JsonapiMenuItemsTest.php:296
    /builds/issue/jsonapi_menu_items-3451149/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
📌 Task
Status

Active

Version

1.2

Component

Code

Created by

🇮🇳India rajeshreeputra Pune

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024