You are here

protected function AssertLegacyTrait::assertFieldChecked in Drupal 8

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

Asserts that a checkbox field in the current page is 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()->checkboxChecked() instead.

38 calls to AssertLegacyTrait::assertFieldChecked()
BlockTest::testBlockToggleVisibility in core/modules/block/tests/src/Functional/BlockTest.php
Tests that visibility can be properly toggled.
BlockTest::testBlockVisibility in core/modules/block/tests/src/Functional/BlockTest.php
Tests block visibility.
BlockTest::testHideBlockTitle in core/modules/block/tests/src/Functional/BlockTest.php
Test block title display settings.
BrowserTestBaseTest::testFieldAssertsForCheckbox in core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
Tests legacy field asserts for checkbox field type.
CommentAdminTest::testApprovalNodeInterface in core/modules/comment/tests/src/Functional/CommentAdminTest.php
Tests comment approval functionality through the node interface.

... See full list

File

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

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertFieldChecked($id) {
  $this
    ->assertSession()
    ->checkboxChecked($id);
}