function EntityReferenceWidgetTest::assertAnnounceContains
Same name in other branches
- 11.x core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php \Drupal\Tests\media_library\FunctionalJavascript\EntityReferenceWidgetTest::assertAnnounceContains()
Checks for inclusion of text in #drupal-live-announce.
@internal
Parameters
string $expected_message: The text that is expected to be present in the #drupal-live-announce element.
Overrides MediaLibraryTestBase::assertAnnounceContains
1 call to EntityReferenceWidgetTest::assertAnnounceContains()
- EntityReferenceWidgetTest::testWidget in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ EntityReferenceWidgetTest.php - Tests that the Media library's widget works as expected.
File
-
core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ EntityReferenceWidgetTest.php, line 574
Class
- EntityReferenceWidgetTest
- Tests the Media library entity reference widget.
Namespace
Drupal\Tests\media_library\FunctionalJavascriptCode
protected function assertAnnounceContains(string $expected_message) : void {
$assert_session = $this->assertSession();
$this->assertNotEmpty($assert_session->waitForElement('css', "#drupal-live-announce:contains('{$expected_message}')"));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.