You are here

protected function AssertLegacyTrait::assertNoOption in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::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.

Deprecated

in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionNotExists() instead.

See also

https://www.drupal.org/node/3129738

1 call to AssertLegacyTrait::assertNoOption()
BrowserTestBaseTest::testFieldAssertsForOptions in core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
Tests legacy field asserts for options field type.

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 595

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertNoOption($id, $option) {
  @trigger_error('AssertLegacyTrait::assertNoOption() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionNotExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
  return $this
    ->assertSession()
    ->optionNotExists($id, $option);
}