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

Issue fork drupal-3522969

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

longwave created an issue. See original summary.

annmarysruthy’s picture

Assigned: Unassigned » annmarysruthy

annmarysruthy’s picture

Assigned: annmarysruthy » Unassigned
Status: Active » Needs review
smustgrave’s picture

This probably could of been a novice task for a new user.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

  • catch committed 1f576a22 on 11.2.x
    Issue #3522969 by annmarysruthy: Deprecate BrowserTestBase::getOptions...

  • catch committed b709c5ae on 11.x
    Issue #3522969 by annmarysruthy: Deprecate BrowserTestBase::getOptions()
    
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 11.2.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.