Commit d9a318b2 authored by catch's avatar catch

Issue #2419005 by dawehner, alexpott: Aggregator: Uncaught PHP Exception...

Issue #2419005 by dawehner, alexpott: Aggregator: Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException: "The "FeedTitle" plugin does not exist."
parent e132a971
......@@ -508,6 +508,8 @@ services:
validation.constraint:
class: Drupal\Core\Validation\ConstraintManager
parent: default_plugin_manager
tags:
- { name: plugin_manager_cache_clear }
lock:
class: Drupal\Core\Lock\DatabaseLockBackend
arguments: ['@database']
......
......@@ -79,6 +79,19 @@ protected function createTestEntity($entity_type) {
* Tests validating test entity types.
*/
public function testValidation() {
// Ensure that the constraint manager is marked as cached cleared.
$plugin_cache_clearer = \Drupal::service('plugin.cache_clearer');
$get_cached_discoveries = function () {
return $this->cachedDiscoveries;
};
$get_cached_discoveries = $get_cached_discoveries->bindTo($plugin_cache_clearer, $plugin_cache_clearer);
$cached_discoveries = $get_cached_discoveries();
$cached_discovery_classes = [];
foreach ($cached_discoveries as $cached_discovery) {
$cached_discovery_classes[] = get_class($cached_discovery);
}
$this->assertTrue(in_array('Drupal\Core\Validation\ConstraintManager', $cached_discovery_classes));
// All entity variations have to have the same results.
foreach (entity_test_entity_types() as $entity_type) {
$this->checkValidation($entity_type);
......
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