protected function AssertLegacyTrait::assertElementNotPresent in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertElementNotPresent()
Asserts that the element with the given CSS selector is not present.
Parameters
string $css_selector: The CSS selector identifying the element to check.
Deprecated
in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->elementNotExists() instead.
See also
https://www.drupal.org/node/3129738
1 call to AssertLegacyTrait::assertElementNotPresent()
- AssertLegacyTraitTest::testAssertElementNotPresent in core/
tests/ Drupal/ Tests/ Core/ Assert/ AssertLegacyTraitTest.php - @covers ::assertElementNotPresent
File
- core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 51
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function assertElementNotPresent($css_selector) {
@trigger_error('AssertLegacyTrait::assertElementNotPresent() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->elementNotExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
$this
->assertSession()
->elementNotExists('css', $css_selector);
}