You are here

protected function AssertLegacyTrait::assertNoFieldChecked in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertNoFieldChecked()

Asserts that a checkbox field in the current page is not checked.

Parameters

string $id: ID of field to assert.

Deprecated

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

See also

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

1 call to AssertLegacyTrait::assertNoFieldChecked()
BrowserTestBaseTest::testLegacyFieldAssertsForCheckbox in core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
Tests legacy assertFieldChecked() and assertNoFieldChecked().

File

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

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

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