3 namespace Drupal\FunctionalTests\Installer;
5 use Drupal\Tests\BrowserTestBase;
8 * Tests that an install profile with only dependencies works as expected.
13 class InstallProfileDependenciesBcTest extends BrowserTestBase {
18 protected $profile = 'testing_install_profile_dependencies_bc';
21 * Tests that the install profile BC layer for dependencies key works.
23 * @expectedDeprecation The install profile core/profiles/testing_install_profile_dependencies_bc/testing_install_profile_dependencies_bc.info.yml only implements a 'dependencies' key. As of Drupal 8.6.0 profile's support a new 'install' key for modules that should be installed but not depended on. See https://www.drupal.org/node/2952947.
25 public function testUninstallingModules() {
26 $user = $this->drupalCreateUser(['administer modules']);
27 $this->drupalLogin($user);
28 $this->drupalGet('admin/modules/uninstall');
29 $this->getSession()->getPage()->checkField('uninstall[ban]');
30 $this->getSession()->getPage()->checkField('uninstall[dblog]');
31 $this->click('#edit-submit');
32 // Click the confirm button.
33 $this->click('#edit-submit');
34 $this->assertSession()->responseContains('The selected modules have been uninstalled.');
35 $this->assertSession()->responseContains('No modules are available to uninstall.');
36 // We've uninstalled modules therefore we need to rebuild the container in
38 $this->rebuildContainer();
39 $module_handler = $this->container->get('module_handler');
40 $this->assertFalse($module_handler->moduleExists('ban'));
41 $this->assertFalse($module_handler->moduleExists('dblog'));