Chris@17: drupalCreateUser(['administer modules']); Chris@17: $this->drupalLogin($user); Chris@17: $this->drupalGet('admin/modules/uninstall'); Chris@17: $this->getSession()->getPage()->checkField('uninstall[ban]'); Chris@17: $this->getSession()->getPage()->checkField('uninstall[dblog]'); Chris@17: $this->click('#edit-submit'); Chris@17: // Click the confirm button. Chris@17: $this->click('#edit-submit'); Chris@17: $this->assertSession()->responseContains('The selected modules have been uninstalled.'); Chris@17: $this->assertSession()->responseContains('No modules are available to uninstall.'); Chris@17: // We've uninstalled modules therefore we need to rebuild the container in Chris@17: // the test runner. Chris@17: $this->rebuildContainer(); Chris@17: $module_handler = $this->container->get('module_handler'); Chris@17: $this->assertFalse($module_handler->moduleExists('ban')); Chris@17: $this->assertFalse($module_handler->moduleExists('dblog')); Chris@17: } Chris@17: Chris@17: }