Skip to content
Snippets Groups Projects
Commit bf06e183 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #1965836 by EclipseGc: Fixed The Condition Manager Needs the Namespace.

parent f2886197
No related branches found
No related tags found
No related merge requests found
...@@ -353,6 +353,7 @@ services: ...@@ -353,6 +353,7 @@ services:
arguments: ['@database'] arguments: ['@database']
plugin.manager.condition: plugin.manager.condition:
class: Drupal\Core\Condition\ConditionManager class: Drupal\Core\Condition\ConditionManager
arguments: ['%container.namespaces%']
kernel_destruct_subscriber: kernel_destruct_subscriber:
class: Drupal\Core\EventSubscriber\KernelDestructionSubscriber class: Drupal\Core\EventSubscriber\KernelDestructionSubscriber
tags: tags:
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
namespace Drupal\node\Tests\Condition; namespace Drupal\node\Tests\Condition;
use Drupal\simpletest\DrupalUnitTestBase; use Drupal\simpletest\DrupalUnitTestBase;
use Drupal\Core\Condition\ConditionManager;
/** /**
* Tests the node conditions. * Tests the node conditions.
...@@ -38,7 +37,7 @@ protected function setUp() { ...@@ -38,7 +37,7 @@ protected function setUp() {
* Tests conditions. * Tests conditions.
*/ */
function testConditions() { function testConditions() {
$manager = new ConditionManager($this->container->getParameter('container.namespaces')); $manager = $this->container->get('plugin.manager.condition');
// Get some nodes of various types to check against. // Get some nodes of various types to check against.
$page = entity_create('node', array('type' => 'page', 'title' => $this->randomName())); $page = entity_create('node', array('type' => 'page', 'title' => $this->randomName()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment