Fix strict type errors in WebAssert calls

Created on 13 February 2024, 10 months ago
Updated 12 March 2024, 9 months ago

Problem/Motivation

The latest version of behat/mink added type declarations to WebAssert methods. In 📌 Update Behat from 1.10 to 1.11 Active we updated calls from Functional Javascript tests, since they have strict typing, but we need to fix calls in Functional tests too so strict typing can be added.

Steps to reproduce

See 📌 Add declare(strict_types=1) to all Functional tests Fixed

Proposed resolution

Fix calls to the following methods in the following tests:

\Behat\Mink\WebAssert::statusCodeEquals
- \Drupal\Tests\demo_umami\Functional\DemoUmamiProfileTest
- \Drupal\Tests\content_moderation\Functional\ModerationFormTest

\Behat\Mink\WebAssert::elementAttributeContains
- Drupal\Tests\content_moderation\Functional\ViewsModerationStateFilterTest
- Drupal\Tests\telephone\Functional\TelephoneFieldTest::testTelephoneWidget

\Behat\Mink\Element\NodeElement::selectOption
- Drupal\Tests\datetime\Functional\Views\FilterDateTest

\Behat\Mink\WebAssert::pageTextNotContains
- Drupal\Tests\system\Functional\Theme\TwigTransTest

\Behat\Mink\WebAssert::fieldValueNotEquals
- Drupal\FunctionalTests\BrowserTestBaseTest::testFieldAssertsForCheckbox

\Behat\Mink\WebAssert::elementContains
- Drupal\Tests\update\Functional\UpdateSemverContribBaselineTest::testMajorUpdateAvailable
- Drupal\Tests\update\Functional\UpdateSemverCoreBaselineTest::testMajorUpdateAvailable
- (maybe core/modules/update/tests/src/Functional/UpdateSemverTestBaselineTrait.php)

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

10.2

Component
PHPUnit 

Last updated about 12 hours ago

Created by

🇦🇺Australia mstrelan

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024