public function LingotekModuleUninstallationTest::testUninstallModule in Lingotek Translation 8.2
Same name and namespace in other branches
- 4.0.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
- 3.0.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
- 3.1.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
- 3.2.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
- 3.3.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
- 3.4.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
- 3.5.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
- 3.6.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
- 3.7.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
- 3.8.x tests/src/Functional/LingotekModuleUninstallationTest.php \Drupal\Tests\lingotek\Functional\LingotekModuleUninstallationTest::testUninstallModule()
Tests that the module can be enabled.
File
- tests/
src/ Functional/ LingotekModuleUninstallationTest.php, line 34
Class
- LingotekModuleUninstallationTest
- Tests that the module can be uninstalled.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testUninstallModule() {
// Login as admin.
$this
->drupalLogin($this->rootUser);
// Navigate to the Extend page.
$this
->drupalGet('/admin/modules');
// Ensure the module is not enabled yet.
$this
->assertSession()
->checkboxChecked('edit-modules-lingotek-enable');
$this
->clickLink('Uninstall');
// Post the form uninstalling the lingotek module.
$edit = [
'uninstall[lingotek]' => '1',
];
$this
->drupalPostForm(NULL, $edit, 'Uninstall');
// We get an advice and we can confirm.
$this
->assertText('The following modules will be completely uninstalled from your site, and all data from these modules will be lost!');
$this
->assertSession()
->responseContains('The listed configuration will be deleted.');
$this
->assertSession()
->responseContains('Lingotek Profile');
$this
->drupalPostForm(NULL, [], 'Uninstall');
$this
->assertSession()
->responseContains('The selected modules have been uninstalled.');
}