rename WebDriverTestBase::getSession() and WebDriverTestBase::assertSession() to be less confusing

Created on 31 July 2019, over 5 years ago
Updated 6 November 2024, 9 days ago

WebDriverTestBase::getSession() and WebDriverTestBase::assertSession() do completely different things, despite having very similar names:

- assertSession -- returns \Drupal\Tests\WebAssert A new web-assert option for asserting the presence of elements with.

- getSession -- returns \Behat\Mink\Session The active Mink session object.

The two methods return completely different things, despite sounding like maybe one checks the session is OK and the other getting you the actual session to work with. Also, something called assertFoo() looks like a PHPUnit assertion, and you wouldn't expect that to return anything.

Could these be renamed to something clearer?

📌 Task
Status

Active

Version

11.0 🔥

Component

phpunit

Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024