diff --git a/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Plugin/Type/SelectionPluginManager.php b/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Plugin/Type/SelectionPluginManager.php index b80de49..2dc8112 100644 --- a/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Plugin/Type/SelectionPluginManager.php +++ b/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Plugin/Type/SelectionPluginManager.php @@ -24,7 +24,7 @@ class SelectionPluginManager extends PluginManagerBase { * Constructs a SelectionPluginManager object. */ public function __construct() { - $this->baseDiscovery = new AlterDecorator(new AnnotatedClassDiscovery('entityreference', 'Selection'), 'entityreference_selection'); + $this->baseDiscovery = new AlterDecorator(new AnnotatedClassDiscovery('entityreference', 'selection'), 'entityreference_selection'); $this->discovery = new CacheDecorator($this->baseDiscovery, 'entityreference_selection'); $this->factory = new ReflectionFactory($this); } diff --git a/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Tests/EntityReferenceSelectionAccessTest.php b/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Tests/EntityReferenceSelectionAccessTest.php index bc4ec8a..3c9a141 100644 --- a/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Tests/EntityReferenceSelectionAccessTest.php +++ b/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Tests/EntityReferenceSelectionAccessTest.php @@ -24,6 +24,15 @@ public static function getInfo() { public static $modules = array('node', 'comment', 'entityreference'); + function setUp() { + parent::setUp(); + + // Create an Article node type. + if ($this->profile != 'standard') { + $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article')); + } + } + protected function assertReferencable($field, $tests, $handler_name) { $handler = entityreference_get_selection_handler($field); @@ -107,7 +116,7 @@ public function testNodeHandler() { array(NULL, 'CONTAINS'), ), 'result' => array( - 'article' => array( + 'Article' => array( $nodes['published1']->nid => $node_labels['published1'], $nodes['published2']->nid => $node_labels['published2'], ), @@ -119,7 +128,7 @@ public function testNodeHandler() { array('Published1', 'CONTAINS'), ), 'result' => array( - 'article' => array( + 'Article' => array( $nodes['published1']->nid => $node_labels['published1'], ), ), @@ -130,7 +139,7 @@ public function testNodeHandler() { array('Published2', 'CONTAINS'), ), 'result' => array( - 'article' => array( + 'Article' => array( $nodes['published2']->nid => $node_labels['published2'], ), ), @@ -159,7 +168,7 @@ public function testNodeHandler() { array(NULL, 'CONTAINS'), ), 'result' => array( - 'article' => array( + 'Article' => array( $nodes['published1']->nid => $node_labels['published1'], $nodes['published2']->nid => $node_labels['published2'], $nodes['unpublished']->nid => $node_labels['unpublished'], @@ -171,7 +180,7 @@ public function testNodeHandler() { array('Node unpublished', 'CONTAINS'), ), 'result' => array( - 'article' => array( + 'Article' => array( $nodes['unpublished']->nid => $node_labels['unpublished'], ), ), @@ -244,7 +253,7 @@ public function testUserHandler() { array(NULL, 'CONTAINS'), ), 'result' => array( - 'user' => array( + 'User' => array( $users['admin']->uid => $user_labels['admin'], $users['non_admin']->uid => $user_labels['non_admin'], ), @@ -256,7 +265,7 @@ public function testUserHandler() { array('NON_ADMIN', 'CONTAINS'), ), 'result' => array( - 'user' => array( + 'User' => array( $users['non_admin']->uid => $user_labels['non_admin'], ), ), @@ -283,7 +292,7 @@ public function testUserHandler() { array(NULL, 'CONTAINS'), ), 'result' => array( - 'user' => array( + 'User' => array( $users['anonymous']->uid => $user_labels['anonymous'], $users['admin']->uid => $user_labels['admin'], $users['non_admin']->uid => $user_labels['non_admin'], @@ -296,7 +305,7 @@ public function testUserHandler() { array('blocked', 'CONTAINS'), ), 'result' => array( - 'user' => array( + 'User' => array( $users['blocked']->uid => $user_labels['blocked'], ), ), @@ -307,7 +316,7 @@ public function testUserHandler() { array('anonymous', 'CONTAINS'), ), 'result' => array( - 'user' => array( + 'User' => array( $users['anonymous']->uid => $user_labels['anonymous'], ), ), @@ -406,7 +415,7 @@ public function testCommentHandler() { array(NULL, 'CONTAINS'), ), 'result' => array( - 'comment_node_article' => array( + 'Article comment' => array( $comments['published_published']->cid => $comment_labels['published_published'], ), ), @@ -416,7 +425,7 @@ public function testCommentHandler() { array('Published', 'CONTAINS'), ), 'result' => array( - 'comment_node_article' => array( + 'Article comment' => array( $comments['published_published']->cid => $comment_labels['published_published'], ), ), @@ -445,7 +454,7 @@ public function testCommentHandler() { array(NULL, 'CONTAINS'), ), 'result' => array( - 'comment_node_article' => array( + 'Article comment' => array( $comments['published_published']->cid => $comment_labels['published_published'], $comments['published_unpublished']->cid => $comment_labels['published_unpublished'], ), @@ -463,7 +472,7 @@ public function testCommentHandler() { array(NULL, 'CONTAINS'), ), 'result' => array( - 'comment_node_article' => array( + 'Article comment' => array( $comments['published_published']->cid => $comment_labels['published_published'], $comments['published_unpublished']->cid => $comment_labels['published_unpublished'], $comments['unpublished_published']->cid => $comment_labels['unpublished_published'],