diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc index 8fb7420..923b623 100644 --- a/core/modules/comment/comment.views.inc +++ b/core/modules/comment/comment.views.inc @@ -559,4 +559,5 @@ function comment_views_data_alter(&$data) { */ function comment_views_plugins_row_alter(&$data) { $data['entity:comment']['class'] = 'Drupal\comment\Plugin\views\row\CommentRow'; + $data['entity:comment']['module'] = 'comment'; } diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc index c66bede..cb5a8da 100644 --- a/core/modules/node/node.views.inc +++ b/core/modules/node/node.views.inc @@ -710,4 +710,5 @@ function node_views_wizard() { */ function node_views_plugins_row_alter(&$data) { $data['entity:node']['class'] = 'Drupal\node\Plugin\views\row\NodeRow'; + $data['entity:node']['module'] = 'node'; } diff --git a/core/modules/user/user.views.inc b/core/modules/user/user.views.inc index 83942f5..60e5ebe 100644 --- a/core/modules/user/user.views.inc +++ b/core/modules/user/user.views.inc @@ -395,4 +395,5 @@ function user_views_query_substitutions($view) { */ function user_views_plugins_row_alter(&$data) { $data['entity:user']['class'] = 'Drupal\user\Plugin\views\row\UserRow'; + $data['entity:user']['module'] = 'user'; } diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php index 6e90a92..4f6a06a 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php @@ -21,7 +21,7 @@ class RowEntityTest extends ViewTestBase { * * @var array */ - public static $modules = array('taxonomy'); + public static $modules = array('entity_test'); /** * Views used by this test. @@ -39,12 +39,21 @@ public static function getInfo() { } /** - * Tests the area handler. + * Overrides \Drupal\views\Tests\ViewTestBase::viewsData(). */ - public function testEntityArea() { - // @todo Replace the taxonomy term used here with the entity_test entity - // once it can be rendered. - $term = entity_create('taxonomy_term', array('name' => $this->randomName())); + protected function viewsData() { + $data = parent::viewsData(); + + $data['entity_test_render'] = $data['entity_test']; + $data['entity_test_render']['real table'] = 'entity_test'; + return $data; + } + + /** + * Tests the entity row handler. + */ + public function testEntityRow() { + $term = entity_create('entity_test', array('name' => $this->randomName())); $term->save(); $view = views_get_view('test_entity_row'); diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_entity_row.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_entity_row.yml index 3ee0097..3e57407 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_entity_row.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_entity_row.yml @@ -1,4 +1,4 @@ -base_table: taxonomy_term_data +base_table: entity_test_render core: '8' description: '' status: '1' @@ -10,19 +10,13 @@ display: pager: '0' pager_options: '0' sorts: '0' - fields: - tid: - field: tid - id: tid - relationship: none - table: taxonomy_term_data pager: options: offset: '0' type: none pager_options: { } row: - type: 'entity:taxonomy_term' + type: 'entity:entity_test_render' options: relationship: none view_mode: full