function ModulesListFormWebTest::testModuleListForm
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php \Drupal\Tests\system\Functional\Form\ModulesListFormWebTest::testModuleListForm()
- 10 core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php \Drupal\Tests\system\Functional\Form\ModulesListFormWebTest::testModuleListForm()
- 11.x core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php \Drupal\Tests\system\Functional\Form\ModulesListFormWebTest::testModuleListForm()
Tests the module list form.
File
-
core/
modules/ system/ tests/ src/ Functional/ Form/ ModulesListFormWebTest.php, line 39
Class
Namespace
Drupal\Tests\system\Functional\FormCode
public function testModuleListForm() {
$this->drupalGet('admin/modules');
// Check that system_test's configure link was rendered correctly.
$this->assertFieldByXPath("//a[contains(@href, '/system-test/configure/bar') and text()='Configure ']/span[contains(@class, 'visually-hidden') and text()='the System test module']");
// Check that system_test's permissions link was rendered correctly.
$this->assertFieldByXPath("//a[contains(@href, '/admin/people/permissions#module-system_test') and @title='Configure permissions']");
// Check that system_test's help link was rendered correctly.
$this->assertFieldByXPath("//a[contains(@href, '/admin/help/system_test') and @title='Help']");
// Ensure that the Testing module's machine name is printed. Testing module
// is used because its machine name is different than its human readable
// name.
$this->assertText('simpletest');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.