class ActionUninstallTest
Same name and namespace in other branches
- 10 core/modules/action/tests/src/Functional/ActionUninstallTest.php \Drupal\Tests\action\Functional\ActionUninstallTest
- 8.9.x core/modules/action/tests/src/Functional/ActionUninstallTest.php \Drupal\Tests\action\Functional\ActionUninstallTest
Tests that uninstalling Actions does not remove other modules' actions.
@group action
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\action\Functional\ActionUninstallTest extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of ActionUninstallTest
See also
\Drupal\views\Plugin\views\field\BulkForm
\Drupal\user\Plugin\Action\BlockUser
File
-
core/
modules/ action/ tests/ src/ Functional/ ActionUninstallTest.php, line 14
Namespace
Drupal\Tests\action\FunctionalView source
class ActionUninstallTest extends BrowserTestBase {
/**
* Modules to install.
*
* @var array
*/
protected static $modules = [
'views',
'action',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests Action uninstall.
*/
public function testActionUninstall() {
\Drupal::service('module_installer')->uninstall([
'action',
]);
$storage = $this->container
->get('entity_type.manager')
->getStorage('action');
$storage->resetCache([
'user_block_user_action',
]);
$this->assertNotEmpty($storage->load('user_block_user_action'), 'Configuration entity \'user_block_user_action\' still exists after uninstalling action module.');
$admin_user = $this->drupalCreateUser([
'administer users',
]);
$this->drupalLogin($admin_user);
$this->drupalGet('admin/people');
// Ensure we have the user_block_user_action listed.
$this->assertSession()
->responseContains('<option value="user_block_user_action">Block the selected user(s)</option>');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.