protected $defaultTheme = 'stark';
/**
* Tests the hook_modules_uninstalled() of the user module.
*/
public function testUserPermsUninstalled() { // Uninstalls the module_test module, so hook_modules_uninstalled()
// is executed.
$this->container->
get('module_installer'
)->
uninstall(['module_test'
]);
// Are the perms defined by module_test removed?
$this->
assertEmpty(user_roles(FALSE, 'module_test perm'
), 'Permissions were all removed.'
);
} /**
* Tests the Uninstall page and Uninstall confirmation page.
*/
public function testUninstallPage() { $account =
$this->
drupalCreateUser(['administer modules'
]);
$this->
drupalLogin($account);
// Create a node type.
$node_type = NodeType::
create(['type' => 'uninstall_blocker', 'name' => 'Uninstall blocker'
]);