protected function ModulesFormTest::assertInstallButtonState in farmOS 2.x
Helper function to assert the state of the install modules button.
Parameters
bool $disabled: Boolean if the checkbox should be disabled. Defaults to FALSE.
2 calls to ModulesFormTest::assertInstallButtonState()
- ModulesFormTest::installModules in modules/
core/ settings/ tests/ src/ Functional/ ModulesFormTest.php - Helper function to test installing a list of modules.
- ModulesFormTest::testInstallFunctionality in modules/
core/ settings/ tests/ src/ Functional/ ModulesFormTest.php - Tests the install functionality of the module settings form.
File
- modules/
core/ settings/ tests/ src/ Functional/ ModulesFormTest.php, line 109
Class
- ModulesFormTest
- Tests installing modules via the module settings form.
Namespace
Drupal\Tests\farm_settings\FunctionalCode
protected function assertInstallButtonState(bool $disabled = FALSE) {
$page = $this
->getSession()
->getPage();
$button = $page
->findButton('install-modules');
$this
->assertNotEmpty($button, "The install modules button exists.");
$this
->assertEquals($disabled, $button
->hasAttribute('disabled'));
}