function MessageCommandTest::assertAnnounceNotContains
Same name in other branches
- 9 core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::assertAnnounceNotContains()
- 10 core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::assertAnnounceNotContains()
- 11.x core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php \Drupal\FunctionalJavascriptTests\Ajax\MessageCommandTest::assertAnnounceNotContains()
Checks for absence of the given text from #drupal-live-announce.
Parameters
string $expected_message: The text expected to be absent from #drupal-live-announce.
1 call to MessageCommandTest::assertAnnounceNotContains()
- MessageCommandTest::testMessageCommand in core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ MessageCommandTest.php - Test AJAX MessageCommand use in a form.
File
-
core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ MessageCommandTest.php, line 124
Class
- MessageCommandTest
- Tests adding messages via AJAX command.
Namespace
Drupal\FunctionalJavascriptTests\AjaxCode
protected function assertAnnounceNotContains($expected_message) {
$assert_session = $this->assertSession();
$this->assertEmpty($assert_session->waitForElement('css', "#drupal-live-announce:contains('{$expected_message}')", 1000));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.