You are here

public function LingotekModuleInstallationTest::testEnableModule in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()
  2. 3.0.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()
  3. 3.1.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()
  4. 3.2.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()
  5. 3.3.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()
  6. 3.4.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()
  7. 3.5.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()
  8. 3.6.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()
  9. 3.7.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()
  10. 3.8.x tests/src/Functional/LingotekModuleInstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleInstallationTest::testEnableModule()

Tests that the module can be enabled.

1 call to LingotekModuleInstallationTest::testEnableModule()
LingotekModuleInstallationTest::testModuleWeightAgainstContentTranslation in tests/src/Functional/LingotekModuleInstallationTest.php
Tests that the weight of the module is higher than content_translation.

File

tests/src/Functional/LingotekModuleInstallationTest.php, line 22

Class

LingotekModuleInstallationTest
Tests that the module can be enabled.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testEnableModule() {

  // Login as admin.
  $this
    ->drupalLogin($this->rootUser);

  // Navigate to the Extend page.
  $this
    ->drupalGet('/admin/modules');

  // Ensure the module is not enabled yet.
  $this
    ->assertNoFieldChecked('edit-modules-lingotek-enable');

  // Post the form enabling the lingotek module.
  $edit = [
    'modules[lingotek][enable]' => '1',
  ];
  $this
    ->drupalPostForm(NULL, $edit, 'Install');

  // Dependencies installation is requested.
  $this
    ->assertText('Some required modules must be enabled');
  $this
    ->drupalPostForm(NULL, [], 'Continue');

  // The module is enabled successfully with its dependencies.
  $this
    ->assertText('modules have been enabled: Lingotek Translation');
}