Issue #2082499 by alexpott: Fixed Uninstalling action module removes actions created by the user module.
parent
2e6aaf6ab4
commit
11aead58a2
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\action\Tests\ActionUninstallTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\action\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
/**
|
||||
* Tests action uninstallation.
|
||||
*
|
||||
* @see \Drupal\action\Plugin\views\field\BulkForm
|
||||
*/
|
||||
class ActionUninstallTest extends WebTestBase {
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = array('views', 'action');
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Uninstall action test',
|
||||
'description' => 'Tests that uninstalling actions does not remove other module\'s actions.',
|
||||
'group' => 'Action',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests Action uninstall.
|
||||
*/
|
||||
public function testActionUninstall() {
|
||||
\Drupal::moduleHandler()->disable(array('action'));
|
||||
\Drupal::moduleHandler()->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>');
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -26,7 +26,7 @@ use Drupal\Component\Plugin\ConfigurablePluginInterface;
|
|||
* "storage" = "Drupal\Core\Config\Entity\ConfigStorageController",
|
||||
* "access" = "Drupal\action\ActionAccessController"
|
||||
* },
|
||||
* config_prefix = "action.action",
|
||||
* config_prefix = "system.action",
|
||||
* entity_keys = {
|
||||
* "id" = "id",
|
||||
* "label" = "label",
|
||||
|
|
|
@ -2198,7 +2198,7 @@ function system_update_8057() {
|
|||
$action['aid'] = $action['callback'] . '_' . $action['aid'];
|
||||
}
|
||||
$configuration = unserialize($action['parameters']) ?: array();
|
||||
Drupal::config('action.action.' . $action['aid'])
|
||||
Drupal::config('system.action.' . $action['aid'])
|
||||
->set('id', $action['aid'])
|
||||
->set('label', $action['label'])
|
||||
->set('status', '1')
|
||||
|
|
Loading…
Reference in New Issue