protected function AssertLegacyTrait::assertNoFieldById in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::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
Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() or $this->assertSession()->fieldValueNotEquals() instead.
19 calls to AssertLegacyTrait::assertNoFieldById()
- BrowserTestBaseTest::testFieldAssertsForButton in core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php - Tests legacy field asserts for button field type.
- BrowserTestBaseTest::testFieldAssertsForCheckbox in core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php - Tests legacy field asserts for checkbox field type.
- BrowserTestBaseTest::testFieldAssertsForTextfields in core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php - Tests legacy field asserts using textfields.
- CachedDataUITest::testCacheData in core/
modules/ views_ui/ tests/ src/ Functional/ CachedDataUITest.php - Tests the shared tempstore views data in the UI.
- CommentAdminTest::testEditComment in core/
modules/ comment/ tests/ src/ Functional/ CommentAdminTest.php - Tests editing a comment as an admin.
File
- core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 424
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function assertNoFieldById($id, $value = '') {
$this
->assertNoFieldByXPath($this
->constructFieldXpath('id', $id), $value);
}