function CKEditorIntegrationTest::assertContextMenuItemNotExists

Asserts that a context menu item does not exist by aria-label attribute.

Parameters

string $label: The `aria-label` attribute value of the context menu item.

1 call to CKEditorIntegrationTest::assertContextMenuItemNotExists()
CKEditorIntegrationTest::testLinkability in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests linkability of the CKEditor widget.

File

core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php, line 1497

Class

CKEditorIntegrationTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21media%21src%21Plugin%21CKEditorPlugin%21DrupalMedia.php/class/DrupalMedia/8.9.x" title="Defines the &quot;drupalmedia&quot; plugin." class="local">\Drupal\media\Plugin\CKEditorPlugin\DrupalMedia</a> @group media

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

protected function assertContextMenuItemNotExists($label) {
    $this->assertSession()
        ->elementNotExists('xpath', '//a[@aria-label="' . $label . '"]');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.