You are here

protected function InstallationTest::installModules in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/InstallationTest.php \Drupal\Tests\video_embed_field\Functional\InstallationTest::installModules()

Install the modules using the UI.

1 call to InstallationTest::installModules()
InstallationTest::testInstallation in tests/src/Functional/InstallationTest.php
Test the installation and uninstallation of the the modules.

File

tests/src/Functional/InstallationTest.php, line 69

Class

InstallationTest
Test the modules install and uninstall cleanly.

Namespace

Drupal\Tests\video_embed_field\Functional

Code

protected function installModules() {
  $this
    ->drupalPostForm('admin/modules', [
    'modules[video_embed_field][enable]' => TRUE,
    'modules[video_embed_wysiwyg][enable]' => TRUE,
  ], 'Install');

  // Continue is only required to confirm dependencies being enabled on the
  // first call of this function.
  if ($button = $this
    ->getSession()
    ->getPage()
    ->findButton('Continue')) {
    $button
      ->press();
  }
}