Fix PHPStan L2 error "Call to an undefined method Drupal\Tests\WebAssert::{Method}"

Created on 12 April 2023, about 1 year ago

Problem/Motivation

There is 500+ warnings thrown by PHPStan level 2 analysis in FunctionalJavascript tests that relate to Call to an undefined method Drupal\Tests\WebAssert::{Method}. The main methods I saw thrown were ::waitForField & ::waitForElement

Steps to reproduce

Review https://dispatcher.drupalci.org/job/drupal_patches/157898/consoleFull and see the errors relating to this issue.

Proposed resolution

Change the return type on WebDriverTestBase::assertSession() from WebAssert to the more specific WebDriverWebAssert

Remaining tasks

Create MR & see if tests pass
Discuss if this is the best approach
Commit!

User interface changes

N/A

API changes

WebDriverTestBase::assertSession return type will become WebDriverWebAssert

Data model changes

N/A

Release notes snippet

Is this needed?

πŸ“Œ Task
Status

Postponed

Version

10.1 ✨

Component
OtherΒ  β†’

Last updated 40 minutes ago

Created by

πŸ‡³πŸ‡ΏNew Zealand DanielVeza Brisbane, AU

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

Comments & Activities

Production build 0.69.0 2024