diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/Views/TaxonomyParentUITest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/Views/TaxonomyParentUITest.php new file mode 100644 index 0000000000000000000000000000000000000000..3a0fe1441507b4fb3fb9ec899e676fdbdf5c958a --- /dev/null +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/Views/TaxonomyParentUITest.php @@ -0,0 +1,62 @@ + 'Taxonomy: Term parent (UI)', + 'description' => 'Tests views taxonomy parent plugin UI.', + 'group' => 'Views module integration', + ); + } + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + + ViewTestData::createTestViews(get_class($this), array('taxonomy_test_views')); + } + + /** + * Tests the taxonomy parent plugin UI. + */ + public function testTaxonomyParentUI() { + $this->drupalGet('admin/structure/views/nojs/handler/test_taxonomy_parent/default/relationship/parent'); + $this->assertNoText('The handler for this item is broken or missing.'); + } + +} diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc index 59b94ffd6ec152a7e80fedcd3fe0791ceef3c47c..2dfa5b22be02031759115f42d9ca26dae840cc21 100644 --- a/core/modules/taxonomy/taxonomy.views.inc +++ b/core/modules/taxonomy/taxonomy.views.inc @@ -338,6 +338,7 @@ function taxonomy_views_data() { 'base' => 'taxonomy_term_data', 'field' => 'parent', 'label' => t('Parent'), + 'id' => 'standard', ), 'filter' => array( 'help' => t('Filter the results of "Taxonomy: Term" by the parent pid.'), diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_parent.yml b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_parent.yml new file mode 100644 index 0000000000000000000000000000000000000000..23594d9486bfc3739863cd8c9287f9f803c953f2 --- /dev/null +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_parent.yml @@ -0,0 +1,140 @@ +base_field: tid +base_table: taxonomy_term_data +core: 8.x +description: '' +status: true +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + provider: views + display_options: + access: + type: perm + options: + perm: 'access content' + provider: user + cache: + type: none + options: { } + provider: views + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + slave: false + query_comment: false + query_tags: { } + provider: views + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + provider: views + pager: + type: full + options: + items_per_page: 10 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 20, 40, 60' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: '‹ previous' + next: 'next ›' + first: '« first' + last: 'last »' + quantity: 9 + provider: views + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + row_class_special: true + uses_fields: false + provider: views + row: + type: fields + options: + inline: { } + separator: '' + hide_empty: false + default_field_elements: true + provider: views + fields: + name: + id: name + table: taxonomy_term_data + field: name + provider: taxonomy + label: '' + alter: + alter_text: false + make_link: false + absolute: false + trim: false + word_boundary: false + ellipsis: false + strip_tags: false + html: false + hide_empty: false + empty_zero: false + link_to_taxonomy: 1 + relationship: none + group_type: group + admin_label: '' + exclude: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_alter_empty: true + convert_spaces: false + filters: { } + sorts: { } + header: { } + footer: { } + empty: { } + relationships: + parent: + id: parent + table: taxonomy_term_hierarchy + field: parent + relationship: none + group_type: group + admin_label: Parent + required: true + plugin_id: standard + provider: views + arguments: { } +label: test_taxonomy_parent +module: views +id: test_taxonomy_parent +tag: '' +langcode: en +dependencies: + module: + - taxonomy