You are here

public function ElementContext::assertNoOption in Lightning Core 8.4

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

Asserts that a select list does not have a particular option.

@Then the :select field should not have a(n) :option option

Parameters

string $select: The select list to check.

string $option: The option to look for.

1 call to ElementContext::assertNoOption()
ElementContext::assertNoOptions in tests/contexts/ElementContext.behat.inc
Asserts that a select list does not have a set of options.

File

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

Class

ElementContext
Contains miscellaneous step definitions for working with HTML elements.

Namespace

Acquia\LightningExtension\Context

Code

public function assertNoOption($select, $option) {
  $this
    ->assertSession()
    ->elementNotExists('named', [
    'option',
    $option,
  ], $this
    ->assertField($select));
}