You are here

public function ModeManagerTest::testGetActiveModes in The CodeMirror Editor 8

Test callback.

File

tests/src/Kernel/ModeManagerTest.php, line 59

Class

ModeManagerTest
A test for plugin.manager.codemirror_mode service.

Namespace

Drupal\Tests\codemirror_editor\Kernel

Code

public function testGetActiveModes() {
  $manager = \Drupal::service('plugin.manager.codemirror_mode');
  $expected_modes = [
    // Required by codemirror_editor_test module.
    'php',
    // Dependency of php mode.
    'clike',
    // Enabled by default.
    'xml',
  ];
  self::assertEquals($expected_modes, $manager
    ->getActiveModes());
}