Deprecate BrowserTestBase::getOptions()

Created on 6 May 2025, 4 days ago

Problem/Motivation

\Drupal\Tests\BrowserTestBase contains this method:

  /**
   * Helper function to get the options of select field.
   *
   * @param \Behat\Mink\Element\NodeElement|string $select
   *   Name, ID, or Label of select field to assert.
   * @param \Behat\Mink\Element\Element $container
   *   (optional) Container element to check against. Defaults to current page.
   *
   * @return array
   *   Associative array of option keys and values.
   */
  protected function getOptions($select, ?Element $container = NULL) {

This function is never called in core, and doesn't seem like something we should be providing in the base class.

Steps to reproduce

Proposed resolution

Deprecate it for removal in Drupal 12.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

phpunit

Created by

🇬🇧United Kingdom longwave UK

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