You are here

protected function CKEditorIntegrationTest::leaveSourceMode in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php \Drupal\Tests\media\FunctionalJavascript\CKEditorIntegrationTest::leaveSourceMode()

Leaves source mode and returns to the CKEditor iframe.

2 calls to CKEditorIntegrationTest::leaveSourceMode()
CKEditorIntegrationTest::testAlignment in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests alignment integration.
CKEditorIntegrationTest::testAlt in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests the EditorMediaDialog can set the alt attribute.

File

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

Class

CKEditorIntegrationTest
@coversDefaultClass \Drupal\media\Plugin\CKEditorPlugin\DrupalMedia @group media

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

protected function leaveSourceMode() {

  // Press the source button again to leave source mode.
  $this
    ->pressEditorButton('source');

  // Having entered source mode means we need to reassign an ID to the
  // CKEditor iframe.
  $this
    ->assignNameToCkeditorIframe();
  $this
    ->getSession()
    ->switchToIFrame('ckeditor');
}