You are here

function UninstallTest::testUserPermsUninstalled in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Module/UninstallTest.php \Drupal\system\Tests\Module\UninstallTest::testUserPermsUninstalled()

Tests the hook_modules_uninstalled() of the user module.

File

core/modules/system/src/Tests/Module/UninstallTest.php, line 32
Contains \Drupal\system\Tests\Module\UninstallTest.

Class

UninstallTest
Tests the uninstallation of modules.

Namespace

Drupal\system\Tests\Module

Code

function testUserPermsUninstalled() {

  // Uninstalls the module_test module, so hook_modules_uninstalled()
  // is executed.
  $this->container
    ->get('module_installer')
    ->uninstall(array(
    'module_test',
  ));

  // Are the perms defined by module_test removed?
  $this
    ->assertFalse(user_roles(FALSE, 'module_test perm'), 'Permissions were all removed.');
}