Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / KernelTests / Core / Plugin / ContextPluginTest.php
index a9ec4b8c7717abba41ec2f9ec14513f33daf020b..8a1fa4842f9d99dcced02d1c6239d684f346ad8e 100644 (file)
@@ -3,7 +3,7 @@
 namespace Drupal\KernelTests\Core\Plugin;
 
 use Drupal\Component\Plugin\Exception\ContextException;
-use Drupal\Core\Plugin\Context\ContextDefinition;
+use Drupal\Core\Plugin\Context\EntityContextDefinition;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\node\Entity\Node;
 use Drupal\node\Entity\NodeType;
@@ -45,7 +45,7 @@ class ContextPluginTest extends KernelTestBase {
     }
 
     // Test the getContextDefinitions() method.
-    $user_context_definition = ContextDefinition::create('entity:user')->setLabel(t('User'));
+    $user_context_definition = EntityContextDefinition::fromEntityTypeId('user')->setLabel(t('User'));
     $this->assertEqual($plugin->getContextDefinitions()['user']->getLabel(), $user_context_definition->getLabel());
 
     // Test the getContextDefinition() method for a valid context.