You are here

protected function InstallationTest::assertInstallationStatus in Video Embed Field 8.2

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

Assert the installation status of the modules.

Parameters

bool $installed: If the modules should be installed or not.

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

File

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

Class

InstallationTest
Test the modules install and uninstall cleanly.

Namespace

Drupal\Tests\video_embed_field\Functional

Code

protected function assertInstallationStatus($installed) {
  $this
    ->drupalGet('admin/modules');

  // @todo, add video_embed_media once infrastructure places version
  // information in module info files.
  foreach ([
    'video_embed_field',
    'video_embed_wysiwyg',
  ] as $module) {
    $this
      ->assertSession()
      ->{$installed ? 'checkboxChecked' : 'checkboxNotChecked'}('modules[' . $module . '][enable]');
  }
}