diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization.yml deleted file mode 100644 index 63569d57a2..0000000000 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization.yml +++ /dev/null @@ -1,215 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - core.entity_view_mode.node.teaser - - user.role.authenticated - module: - - node - - rest - - user -id: rest_export_with_authorization -label: 'Rest Export' -module: views -description: '' -tag: '' -base_table: node_field_data -base_field: nid -display: - default: - display_plugin: default - id: default - display_title: Master - position: 0 - display_options: - access: - type: role - options: - role: - authenticated: authenticated - cache: - type: tag - options: { } - query: - type: views_query - options: - disable_sql_rewrite: false - distinct: false - replica: false - query_comment: '' - query_tags: { } - 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 - 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, 25, 50' - 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 - style: - type: default - row: - type: 'entity:node' - options: - view_mode: teaser - fields: - title: - id: title - table: node_field_data - field: title - entity_type: node - entity_field: title - 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 - settings: - link_to_entity: true - plugin_id: field - 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 - click_sort_column: value - type: string - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - filters: - status: - id: status - table: node_field_data - field: status - relationship: none - group_type: group - admin_label: '' - operator: '=' - value: '0' - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - plugin_id: boolean - entity_type: node - entity_field: status - sorts: - created: - id: created - table: node_field_data - field: created - order: DESC - entity_type: node - entity_field: created - plugin_id: date - relationship: none - group_type: group - admin_label: '' - exposed: false - expose: - label: '' - granularity: second - title: 'Rest Export' - header: { } - footer: { } - empty: { } - relationships: { } - arguments: { } - display_extenders: { } - cache_metadata: - max-age: -1 - contexts: - - 'languages:language_content' - - 'languages:language_interface' - - url.query_args - - 'user.node_grants:view' - - user.roles - tags: { } - rest_export_1: - display_plugin: rest_export - id: rest_export_1 - display_title: 'REST export' - position: 2 - display_options: - display_extenders: { } - path: unpublished-content - auth: - basic_auth: basic_auth - cache_metadata: - max-age: -1 - contexts: - - 'languages:language_content' - - 'languages:language_interface' - - request_format - - 'user.node_grants:view' - - user.roles - tags: { } diff --git a/core/modules/workspaces/tests/src/Functional/Update/WorkspacesUpdateTest.php b/core/modules/workspaces/tests/src/Functional/Update/WorkspacesUpdateTest.php deleted file mode 100644 index 30062be1c7..0000000000 --- a/core/modules/workspaces/tests/src/Functional/Update/WorkspacesUpdateTest.php +++ /dev/null @@ -1,159 +0,0 @@ -databaseDumpFiles = [ - __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.filled.standard.php.gz', - __DIR__ . '/../../../fixtures/update/drupal-8.6.0-workspaces_installed.php', - ]; - } - - /** - * Tests the move of workspace association data to a custom table. - * - * @see workspaces_update_8801() - * @see workspaces_post_update_move_association_data() - */ - public function testWorkspaceAssociationRemoval() { - $database = \Drupal::database(); - - // Check that we have two records in the 'workspace_association' base table - // and three records in its revision table. - $wa_records = $database->select('workspace_association')->countQuery()->execute()->fetchField(); - $this->assertEquals(2, $wa_records); - $war_records = $database->select('workspace_association_revision')->countQuery()->execute()->fetchField(); - $this->assertEquals(3, $war_records); - - // Check that the node entity type does not have a 'workspace' field. - $this->assertNull(\Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('workspace', 'node')); - - $this->runUpdates(); - - $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); - - // Check that the 'workspace' field has been installed for an entity type - // that was workspace-supported before Drupal 8.7.0. - $this->assertTrue($entity_definition_update_manager->getFieldStorageDefinition('workspace', 'node')); - - // Check that the 'workspace' field has been installed for an entity type - // which became workspace-supported as part of an entity schema update. - $this->assertTrue($entity_definition_update_manager->getFieldStorageDefinition('workspace', 'taxonomy_term')); - - // Check that the 'workspace' field has been installed for an entity type - // that has been added in an update function. - $this->assertTrue($entity_definition_update_manager->getFieldStorageDefinition('workspace', 'path_alias')); - - // Check that the 'workspace' revision metadata field has been created only - // in the revision table. - $schema = $database->schema(); - $this->assertTrue($schema->fieldExists('node_revision', 'workspace')); - $this->assertFalse($schema->fieldExists('node', 'workspace')); - $this->assertFalse($schema->fieldExists('node_field_data', 'workspace')); - $this->assertFalse($schema->fieldExists('node_field_revision', 'workspace')); - - // Check that the 'workspace_association' records have been migrated - // properly. - $wa_records = $database->select('workspace_association')->fields('workspace_association')->execute()->fetchAll(\PDO::FETCH_ASSOC); - $expected = [ - [ - 'workspace' => 'stage', - 'target_entity_type_id' => 'node', - 'target_entity_id' => '1', - 'target_entity_revision_id' => '2', - ], - [ - 'workspace' => 'dev', - 'target_entity_type_id' => 'node', - 'target_entity_id' => '8', - 'target_entity_revision_id' => '10', - ], - ]; - $this->assertEquals($expected, $wa_records); - - // Check that the 'workspace_association' revisions has been migrated - // properly to the new 'workspace' revision metadata field. - $revisions = \Drupal::entityTypeManager()->getStorage('node')->loadMultipleRevisions([2, 9, 10]); - $this->assertEquals('stage', $revisions[2]->workspace->target_id); - $this->assertEquals('dev', $revisions[9]->workspace->target_id); - $this->assertEquals('dev', $revisions[10]->workspace->target_id); - - // Check that the 'workspace_association' entity type has been uninstalled. - $this->assertNull($entity_definition_update_manager->getEntityType('workspace_association')); - $this->assertNull($entity_definition_update_manager->getFieldStorageDefinition('id', 'workspace_association')); - $this->assertNull(\Drupal::keyValue('entity.storage_schema.sql')->get('workspace_association.entity_schema_data')); - - // Check that the 'workspace_association_revision' table has been removed. - $this->assertFalse($schema->tableExists('workspace_association_revision')); - } - - /** - * Tests the addition of the workspace 'parent' field. - * - * @see workspaces_update_8802() - * @see workspaces_post_update_update_deploy_form_display() - */ - public function testWorkspaceParentField() { - $this->runUpdates(); - - $this->assertNotEmpty(\Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('parent', 'workspace')); - $stage = Workspace::load('stage'); - $this->assertTrue($stage->hasField('parent')); - $this->assertTrue($stage->parent->isEmpty()); - - // Check that the 'parent' field is hidden in the Deploy form display. - $form_display = EntityFormDisplay::load('workspace.workspace.deploy'); - $this->assertNull($form_display->getComponent('parent')); - } - - /** - * Tests that there is no active workspace during database updates. - */ - public function testActiveWorkspaceDuringUpdate() { - /** @var \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager */ - $workspace_manager = \Drupal::service('workspaces.manager'); - - // Check that we have an active workspace before running the updates. - $this->assertTrue($workspace_manager->hasActiveWorkspace()); - $this->assertEquals('test', $workspace_manager->getActiveWorkspace()->id()); - - $this->runUpdates(); - - // Check that we didn't have an active workspace while running the updates. - // @see workspace_update_test_post_update_check_active_workspace() - $this->assertFalse(\Drupal::state()->get('workspace_update_test.has_active_workspace')); - - // Check that we have an active workspace after running the updates. - $this->assertTrue($workspace_manager->hasActiveWorkspace()); - $this->assertEquals('test', $workspace_manager->getActiveWorkspace()->id()); - } - - /** - * {@inheritdoc} - */ - protected function replaceUser1() { - // Do not replace the user from our dump. - } - -}