function AssertLegacyTrait::assertNoOption

Same name in other branches
  1. 9 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.

10 calls to AssertLegacyTrait::assertNoOption()
BookTest::testGetTableOfContents in core/modules/book/tests/src/Functional/BookTest.php
Tests BookManager::getTableOfContents().
BrowserTestBaseTest::testFieldAssertsForOptions in core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
Tests legacy field asserts for options field type.
BulkFormTest::testBulkForm in core/modules/views/tests/src/Functional/BulkFormTest.php
Tests the bulk form.
BulkFormTest::testBulkForm in core/modules/user/tests/src/Functional/Views/BulkFormTest.php
Tests the user bulk form.
CommentNonNodeTest::testsNonIntegerIdEntities in core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
Tests comment fields cannot be added to entity types without integer IDs.

... See full list

File

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

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.