You are here

protected function TinyMCELoadingTest::getThingsToCheck in TinyMCE 1.x

1 call to TinyMCELoadingTest::getThingsToCheck()
TinyMCELoadingTest::testLoading in tests/src/Functional/TinyMCELoadingTest.php
Tests loading of TinyMCE CSS, JS and JS settings.

File

tests/src/Functional/TinyMCELoadingTest.php, line 141

Class

TinyMCELoadingTest
Tests loading of CKEditor.

Namespace

Drupal\Tests\tinymce\Functional

Code

protected function getThingsToCheck() {
  $settings = $this
    ->getDrupalSettings();
  return [
    // JavaScript settings.
    $settings,
    // Editor.module's JS settings present.
    isset($settings['editor']),
    // Editor.module's JS present. Note: tinymce/tinymce depends on
    // editor/drupal.editor, hence presence of the former implies presence of
    // the latter.
    !empty($this
      ->xpath('//script[contains(@src, "tinymce.js") or contains(@src, "tinymce.min.js")]')),
    // Body field.
    $this
      ->xpath('//textarea[@id="edit-body-0-value"]'),
    // Format selector.
    $this
      ->xpath('//select[contains(@class, "filter-list")]'),
  ];
}