You are here

protected function WebformAssertLegacyTrait::assertNoFieldById in Webform 6.x

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

Asserts that a field does not exist with the given ID and value.

Parameters

string $id: ID of field to assert.

string $value: (optional) Value for the field, to assert that the field's value on the page doesn't match it. You may pass in NULL to skip checking the value, while still checking that the field doesn't exist. However, the default value ('') asserts that the field value is not an empty string.

Throws

\Behat\Mink\Exception\ExpectationException

8 calls to WebformAssertLegacyTrait::assertNoFieldById()
WebformElementAccessTest::testAccess in tests/src/Functional/Element/WebformElementAccessTest.php
Test element access.
WebformElementManagedFilePublicTest::testPublicUpload in tests/src/Functional/Element/WebformElementManagedFilePublicTest.php
Test public upload protection.
WebformElementStatesTest::testElement in tests/src/Functional/Element/WebformElementStatesTest.php
Tests element #states.
WebformOptionsLimitTest::testOptionsLimit in modules/webform_options_limit/tests/src/Functional/WebformOptionsLimitTest.php
Test options limit.
WebformResultsExportOptionsTest::testExportOptions in tests/src/Functional/WebformResultsExportOptionsTest.php
Tests export options.

... See full list

File

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

Class

WebformAssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\Tests\webform\Traits

Code

protected function assertNoFieldById($id, $value = '') {
  $this
    ->assertNoFieldByXPath($this
    ->constructFieldXpath('id', $id), $value);
}