You are here

protected function WebformAssertLegacyTrait::assertNoOption in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Traits/WebformAssertLegacyTrait.php \Drupal\Tests\webform\Traits\WebformAssertLegacyTrait::assertNoOption()

Asserts that a select option does NOT exist in the current page.

Parameters

string $id: ID of select field to assert.

string $option: Option to assert.

2 calls to WebformAssertLegacyTrait::assertNoOption()
WebformFieldTest::testWebformField in tests/src/Functional/Field/WebformFieldTest.php
Tests the webform (entity reference) field.
WebformVariantOperationsTest::testVariantOperations in tests/src/Functional/Variant/WebformVariantOperationsTest.php
Test variant operation.

File

tests/src/Traits/WebformAssertLegacyTrait.php, line 446

Class

WebformAssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\Tests\webform\Traits

Code

protected function assertNoOption($id, $option) {
  return $this
    ->assertSession()
    ->optionNotExists($id, $option);
}