public function LingotekInterfaceTranslationTest::testInterfaceTranslationWithoutPotx in Lingotek Translation 3.5.x
Same name and namespace in other branches
- 4.0.x tests/src/Functional/LingotekInterfaceTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTest::testInterfaceTranslationWithoutPotx()
- 3.2.x tests/src/Functional/LingotekInterfaceTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTest::testInterfaceTranslationWithoutPotx()
- 3.3.x tests/src/Functional/LingotekInterfaceTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTest::testInterfaceTranslationWithoutPotx()
- 3.4.x tests/src/Functional/LingotekInterfaceTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTest::testInterfaceTranslationWithoutPotx()
- 3.6.x tests/src/Functional/LingotekInterfaceTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTest::testInterfaceTranslationWithoutPotx()
- 3.7.x tests/src/Functional/LingotekInterfaceTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTest::testInterfaceTranslationWithoutPotx()
- 3.8.x tests/src/Functional/LingotekInterfaceTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTest::testInterfaceTranslationWithoutPotx()
Tests when potx is not present.
File
- tests/
src/ Functional/ LingotekInterfaceTranslationTest.php, line 44
Class
- LingotekInterfaceTranslationTest
- Tests translating the user interface using the Lingotek form.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testInterfaceTranslationWithoutPotx() {
$assert_session = $this
->assertSession();
// Login as admin.
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('/admin/modules');
// Ensure the module is not enabled yet.
$this
->assertSession()
->checkboxChecked('edit-modules-potx-enable');
$this
->clickLink('Uninstall');
// Post the form uninstalling the lingotek module.
$edit = [
'uninstall[potx]' => '1',
];
$this
->drupalPostForm(NULL, $edit, 'Uninstall');
// We get an advice and we can confirm.
$assert_session
->responseContains('The following modules will be completely uninstalled from your site, and <em>all data from these modules will be lost</em>!');
$assert_session
->responseContains('Translation template extractor');
$this
->drupalPostForm(NULL, [], 'Uninstall');
$this
->goToInterfaceTranslationManagementForm();
$assert_session
->responseContains('The <a href="https://www.drupal.org/project/potx">potx</a> module is required for interface translation with Lingotek');
}