You are here

public function ElementContext::assertOptions in Lightning Core 8.2

Same name and namespace in other branches
  1. 8.5 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertOptions()
  2. 8 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertOptions()
  3. 8.3 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertOptions()
  4. 8.4 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertOptions()

Asserts that a select list has a set of options.

@Then the :select field should have options:

Parameters

string $select: The select list to check.

\Behat\Gherkin\Node\PyStringNode $options: The options to look for.

File

tests/contexts/ElementContext.behat.inc, line 146

Class

ElementContext
Contains miscellaneous step definitions for working with HTML elements.

Namespace

Acquia\LightningExtension\Context

Code

public function assertOptions($select, PyStringNode $options) {
  foreach ($options
    ->getStrings() as $option) {
    $this
      ->assertOption($select, $option);
  }
}