/**
* Tests installing experimental modules and dependencies in the UI.
*/
public function testExperimentalConfirmForm(): void
{ // First, test installing a non-experimental module with no dependencies.
// There should be no confirmation form and no experimental module warning.
$edit =
[];
$edit["modules[test_page_test][enable]"
] = TRUE;
$this->
drupalGet('admin/modules'
);
$this->
submitForm($edit, 'Install'
);
$this->
assertSession()->
pageTextContains('Module Test page has been enabled.'
);
$this->
assertSession()->
pageTextNotContains('Experimental modules are provided for testing purposes only.'
);
// There should be no warning about enabling experimental or deprecated
// modules, since there's no confirmation form.
$this->
assertSession()->
pageTextNotContains('Are you sure you wish to enable '
);
// Uninstall the module.
\Drupal::
service('module_installer'
)->
uninstall(['test_page_test'
]);
// Next, test installing an experimental module with no dependencies.
// There should be a confirmation form with an experimental warning, but no
// list of dependencies.