You are here

public function ActionUninstallTest::testActionUninstall in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/action/src/Tests/ActionUninstallTest.php \Drupal\action\Tests\ActionUninstallTest::testActionUninstall()

Tests Action uninstall.

File

core/modules/action/src/Tests/ActionUninstallTest.php, line 30
Contains \Drupal\action\Tests\ActionUninstallTest.

Class

ActionUninstallTest
Tests that uninstalling actions does not remove other module's actions.

Namespace

Drupal\action\Tests

Code

public function testActionUninstall() {
  \Drupal::service('module_installer')
    ->uninstall(array(
    'action',
  ));
  $this
    ->assertTrue(entity_load('action', 'user_block_user_action', TRUE), 'Configuration entity \'user_block_user_action\' still exists after uninstalling action module.');
  $admin_user = $this
    ->drupalCreateUser(array(
    'administer users',
  ));
  $this
    ->drupalLogin($admin_user);
  $this
    ->drupalGet('admin/people');

  // Ensure we have the user_block_user_action listed.
  $this
    ->assertRaw('<option value="user_block_user_action">Block the selected user(s)</option>');
}