Commit a2b6fe7e authored by catch's avatar catch

Issue #2190665 by alexpott: Remove persist flag from services that do not need it.

parent 754fbce5
......@@ -18,7 +18,6 @@ services:
class: Drupal\Core\Cache\CacheBackendInterface
tags:
- { name: cache.bin }
- { name: persist }
factory_method: get
factory_service: cache_factory
arguments: [config]
......@@ -74,12 +73,9 @@ services:
config.storage:
class: Drupal\Core\Config\CachedStorage
arguments: ['@config.cachedstorage.storage', '@cache.config']
tags:
- { name: persist }
config.factory:
class: Drupal\Core\Config\ConfigFactory
tags:
- { name: persist }
- { name: event_subscriber }
arguments: ['@config.storage', '@event_dispatcher', '@config.typed']
config.installer:
......@@ -134,8 +130,6 @@ services:
state:
class: Drupal\Core\KeyValueStore\State
arguments: ['@keyvalue']
tags:
- { name: persist }
queue:
class: Drupal\Core\Queue\QueueFactory
arguments: ['@settings']
......
......@@ -163,6 +163,7 @@ function testAdmin() {
// Now enable the ckeditor_test module, which provides one configurable
// CKEditor plugin — this should not affect the Editor config entity.
\Drupal::moduleHandler()->install(array('ckeditor_test'));
$this->rebuildContainer();
$this->container->get('plugin.manager.ckeditor.plugin')->clearCachedDefinitions();
$this->drupalGet('admin/config/content/formats/manage/filtered_html');
$ultra_llama_mode_checkbox = $this->xpath('//input[@type="checkbox" and @name="editor[settings][plugins][llama_contextual_and_button][ultra_llama_mode]" and not(@checked)]');
......
......@@ -81,6 +81,7 @@ function testEnabledPlugins() {
// variations of it, to cover all possible ways a plugin can be enabled) and
// clear the editor manager's cache so it is picked up.
$this->enableModules(array('ckeditor_test'));
$this->manager = $this->container->get('plugin.manager.ckeditor.plugin');
$this->manager->clearCachedDefinitions();
// Case 2: CKEditor plugins are available.
......
......@@ -111,6 +111,8 @@ public function testText() {
public function testTextWysiwyg() {
// Enable edit_test module so that the 'wysiwyg' editor becomes available.
$this->enableModules(array('edit_test'));
$this->editorManager = $this->container->get('plugin.manager.edit.editor');
$this->editorSelector = new EditorSelector($this->editorManager, $this->container->get('plugin.manager.field.formatter'));
$field_name = 'field_textarea';
$this->createFieldWithInstance(
......
......@@ -133,6 +133,9 @@ public function testEditorWithCustomMetadata() {
// Enable edit_test module so that the WYSIWYG editor becomes available.
$this->enableModules(array('edit_test'));
$this->editorManager = $this->container->get('plugin.manager.edit.editor');
$this->editorSelector = new EditorSelector($this->editorManager, $this->container->get('plugin.manager.field.formatter'));
$this->metadataGenerator = new MetadataGenerator($this->accessChecker, $this->editorSelector, $this->editorManager);
$this->editorManager = $this->container->get('plugin.manager.edit.editor');
$this->editorSelector = new EditorSelector($this->editorManager, $this->container->get('plugin.manager.field.formatter'));
......
......@@ -78,6 +78,7 @@ public function testManager() {
// Enable the Text Editor Test module, which has the Unicorn Editor and
// clear the editor manager's cache so it is picked up.
$this->enableModules(array('editor_test'));
$this->editorManager = $this->container->get('plugin.manager.editor');
$this->editorManager->clearCachedDefinitions();
// Case 2: a text editor available.
......
......@@ -17,9 +17,11 @@ class NodeTest extends RESTTestBase {
/**
* Modules to enable.
*
* Ensure that the node resource works with comment module enabled.
*
* @var array
*/
public static $modules = array('hal', 'rest');
public static $modules = array('hal', 'rest', 'comment');
public static function getInfo() {
return array(
......@@ -49,8 +51,6 @@ protected function enableNodeConfiguration($method, $operation) {
* Performs various tests on nodes and their REST API.
*/
public function testNodes() {
// Tests that the node resource works with comment module enabled.
$this->container->get('module_handler')->install(array('comment'));
$this->enableNodeConfiguration('GET', 'view');
$node = $this->entityCreate('node');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment