public function UninstallTest::testUserPermsUninstalled in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/Module/UninstallTest.php \Drupal\Tests\system\Functional\Module\UninstallTest::testUserPermsUninstalled()
- 10 core/modules/system/tests/src/Functional/Module/UninstallTest.php \Drupal\Tests\system\Functional\Module\UninstallTest::testUserPermsUninstalled()
Tests the hook_modules_uninstalled() of the user module.
File
- core/
modules/ system/ tests/ src/ Functional/ Module/ UninstallTest.php, line 34
Class
- UninstallTest
- Tests the uninstallation of modules.
Namespace
Drupal\Tests\system\Functional\ModuleCode
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.');
}