diff --git a/config/optional/linkit.linkit_profile.default.yml b/config/optional/linkit.linkit_profile.default.yml index fe06c78197d22801f71ff33a6ed841a83b803c78..7aa4092fa8399d94412db01caadba9365a19faee 100644 --- a/config/optional/linkit.linkit_profile.default.yml +++ b/config/optional/linkit.linkit_profile.default.yml @@ -1,19 +1,19 @@ -langcode: en -status: true -dependencies: - module: - - node -id: default -label: Default -description: 'A default Linkit profile' -matchers: - 556010a3-e317-48b3-b4ed-854c10f4b950: - uuid: 556010a3-e317-48b3-b4ed-854c10f4b950 - id: 'entity:node' - weight: 0 - settings: - result_description: 'by [node:author] | [node:created:medium]' - bundles: { } - group_by_bundle: false - include_unpublished: false - substitution_type: canonical +langcode: en +status: true +dependencies: + module: + - node +id: default +label: Default +description: 'A default Linkit profile' +matchers: + 556010a3-e317-48b3-b4ed-854c10f4b950: + uuid: 556010a3-e317-48b3-b4ed-854c10f4b950 + id: 'entity:node' + weight: 0 + settings: + metadata: 'by [node:author] | [node:created:medium]' + bundles: { } + group_by_bundle: false + include_unpublished: false + substitution_type: canonical diff --git a/config/schema/linkit.schema.yml b/config/schema/linkit.schema.yml index 3952576b720ce139b95558ba087552e05d07d51f..e6854cf91ebec172b665f3169d66ae61c68f92ea 100644 --- a/config/schema/linkit.schema.yml +++ b/config/schema/linkit.schema.yml @@ -34,7 +34,7 @@ linkit.matcher.*: linkit.matcher.entity: type: mapping mapping: - result_description: + metadata: type: string bundles: type: sequence diff --git a/linkit.install b/linkit.install index 0b42ea9947204b5f87e6a236121af4ea553c908a..29561e2837a8c5fd889bc94379f5242dc90f1e0d 100644 --- a/linkit.install +++ b/linkit.install @@ -153,3 +153,21 @@ function linkit_update_8501() { $profile->save(TRUE); } } + +/** + * Rename profile property 'result_description' to 'metadata'. + */ +function linkit_update_8502() { + $config_factory = \Drupal::configFactory(); + foreach ($config_factory->listAll('linkit.linkit_profile.') as $id) { + $profile = $config_factory->getEditable($id); + + foreach ($profile->get('matchers') as $key => $matcher) { + $old_value = $profile->get('matchers.' . $key . '.settings.result_description'); + $profile->set('matchers.' . $key . '.settings.metadata', $old_value); + $profile->clear('matchers.' . $key . '.settings.result_description'); + } + + $profile->save(TRUE); + } +} diff --git a/src/MatcherTokensTrait.php b/src/MatcherTokensTrait.php index 28113b6d401f08e1cdd7729416d091d8becc355f..d17fe56c102523018a252282a197afeb16395cc7 100644 --- a/src/MatcherTokensTrait.php +++ b/src/MatcherTokensTrait.php @@ -18,11 +18,11 @@ trait MatcherTokensTrait { public function insertTokenList(&$form, array $types = []) { if (\Drupal::moduleHandler()->moduleExists('token')) { // Add the token tree UI. - $form['token_tree'] = [ + $form['metadata']['token_tree'] = [ '#theme' => 'token_tree_link', '#token_types' => $types, '#dialog' => TRUE, - '#weight' => -90, + '#weight' => 10, ]; } else { @@ -35,13 +35,13 @@ trait MatcherTokensTrait { } if (count($token_items)) { - $form['tokens'] = [ + $form['metadata']['tokens'] = [ '#type' => 'details', '#title' => t('Available tokens'), - '#weight' => -90, + '#weight' => 10, ]; - $form['tokens']['list'] = [ + $form['metadata']['tokens']['list'] = [ '#theme' => 'item_list', '#items' => $token_items, ]; diff --git a/src/Plugin/Linkit/Matcher/EntityMatcher.php b/src/Plugin/Linkit/Matcher/EntityMatcher.php index 812a07686b0e26290b07e47fb63418208206981f..5bfca1e5bfa8bef568e05d993b18984ca84738d1 100644 --- a/src/Plugin/Linkit/Matcher/EntityMatcher.php +++ b/src/Plugin/Linkit/Matcher/EntityMatcher.php @@ -133,10 +133,10 @@ class EntityMatcher extends ConfigurableMatcherBase { $summery = parent::getSummary(); $entity_type = $this->entityTypeManager->getDefinition($this->targetType); - $result_description = $this->configuration['result_description']; - if (!empty($result_description)) { - $summery[] = $this->t('Result description: @result_description', [ - '@result_description' => $result_description, + $metadata = $this->configuration['metadata']; + if (!empty($metadata)) { + $summery[] = $this->t('Metadata: @metadata', [ + '@metadata' => $metadata, ]); } @@ -168,7 +168,7 @@ class EntityMatcher extends ConfigurableMatcherBase { */ public function defaultConfiguration() { return parent::defaultConfiguration() + [ - 'result_description' => '', + 'metadata' => '', 'bundles' => [], 'group_by_bundle' => FALSE, 'substitution_type' => SubstitutionManagerInterface::DEFAULT_SUBSTITUTION, @@ -180,13 +180,22 @@ class EntityMatcher extends ConfigurableMatcherBase { */ public function buildConfigurationForm(array $form, FormStateInterface $form_state) { $entity_type = $this->entityTypeManager->getDefinition($this->targetType); - $form['result_description'] = [ - '#title' => $this->t('Result description'), + + $form['metadata'] = array( + '#type' => 'details', + '#title' => t('Suggestion metadata'), + '#open' => TRUE, + '#weight' => -100, + ); + + $form['metadata']['metadata'] = [ + '#title' => $this->t('Metadata'), '#type' => 'textfield', - '#default_value' => $this->configuration['result_description'], + '#default_value' => $this->configuration['metadata'], + '#description' => $this->t('Metadata is shown together with each suggestion in the suggestion list.'), '#size' => 120, '#maxlength' => 255, - '#weight' => -100, + '#weight' => 0, ]; $this->insertTokenList($form, [$this->targetType]); @@ -198,34 +207,51 @@ class EntityMatcher extends ConfigurableMatcherBase { $bundle_options[$bundle_name] = $bundle_info['label']; } - $form['bundles'] = [ + $form['bundle_restrictions'] = array( + '#type' => 'details', + '#title' => t('Bundle restrictions'), + '#open' => TRUE, + '#weight' => -90, + ); + + $form['bundle_restrictions']['bundles'] = [ '#type' => 'checkboxes', - '#title' => $this->t('Restrict to the selected bundles'), + '#title' => $this->t('Restrict suggestions to the selected bundles'), '#options' => $bundle_options, '#default_value' => $this->configuration['bundles'], - '#description' => $this->t('If none of the checkboxes is checked, allow all bundles.'), + '#description' => $this->t('If none of the checkboxes is checked, all bundles are allowed.'), '#element_validate' => [[get_class($this), 'elementValidateFilter']], - '#weight' => -50, ]; - // Group the results by bundle. - $form['group_by_bundle'] = [ + $form['bundle_grouping'] = array( + '#type' => 'details', + '#title' => t('Bundle grouping'), + '#open' => TRUE, + ); + + // Group the suggestions by bundle. + $form['bundle_grouping']['group_by_bundle'] = [ '#type' => 'checkbox', '#title' => $this->t('Group by bundle'), '#default_value' => $this->configuration['group_by_bundle'], - '#weight' => -50, + '#description' => $this->t('Group suggestions by their bundle.'), ]; } $substitution_options = $this->substitutionManager->getApplicablePluginsOptionList($this->targetType); - $form['substitution_type'] = [ + $form['substitution'] = array( + '#type' => 'details', + '#title' => t('URL substitution'), + '#open' => TRUE, + '#weight' => 100, + '#access' => count($substitution_options) !== 1, + ); + $form['substitution']['substitution_type'] = [ '#title' => $this->t('Substitution Type'), '#type' => 'select', '#default_value' => $this->configuration['substitution_type'], '#options' => $substitution_options, '#description' => $this->t('Configure how the selected entity should be transformed into a URL for insertion.'), - '#weight' => -49, - '#access' => count($substitution_options) !== 1, ]; return $form; @@ -241,7 +267,7 @@ class EntityMatcher extends ConfigurableMatcherBase { * {@inheritdoc} */ public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { - $this->configuration['result_description'] = $form_state->getValue('result_description'); + $this->configuration['metadata'] = $form_state->getValue('metadata'); $this->configuration['bundles'] = $form_state->getValue('bundles'); $this->configuration['group_by_bundle'] = $form_state->getValue('group_by_bundle'); $this->configuration['substitution_type'] = $form_state->getValue('substitution_type'); @@ -343,16 +369,16 @@ class EntityMatcher extends ConfigurableMatcherBase { } /** - * Builds the description string used in the match array. + * Builds the metadata string used in the match array. * * @param \Drupal\Core\Entity\EntityInterface $entity * The matched entity. * * @return string - * The description for this entity. + * The metadata for this entity. */ protected function buildDescription(EntityInterface $entity) { - $description = \Drupal::token()->replace($this->configuration['result_description'], [$this->targetType => $entity], []); + $description = \Drupal::token()->replace($this->configuration['metadata'], [$this->targetType => $entity], []); return LinkitXss::descriptionFilter($description); } diff --git a/src/Plugin/Linkit/Matcher/FileMatcher.php b/src/Plugin/Linkit/Matcher/FileMatcher.php index f7d8528f11c0d944cbd160268cf2b6bc9f4a8e2a..1b53e5d677839bb33f827d300eb8cfa7126ff562 100644 --- a/src/Plugin/Linkit/Matcher/FileMatcher.php +++ b/src/Plugin/Linkit/Matcher/FileMatcher.php @@ -88,8 +88,15 @@ class FileMatcher extends EntityMatcher { public function buildConfigurationForm(array $form, FormStateInterface $form_state) { $form = parent::buildConfigurationForm($form, $form_state); + $form['extensions'] = array( + '#type' => 'details', + '#title' => t('File extensions'), + '#open' => TRUE, + '#weight' => -100, + ); + $file_extensions = str_replace(' ', ', ', $this->configuration['file_extensions']); - $form['file_extensions'] = [ + $form['extensions']['file_extensions'] = [ '#type' => 'textfield', '#title' => $this->t('Allowed file extensions'), '#default_value' => $file_extensions, @@ -102,6 +109,7 @@ class FileMatcher extends EntityMatcher { '#type' => 'details', '#title' => t('Image file settings'), '#description' => t('Extra settings for image files in the result.'), + '#open' => TRUE, '#tree' => TRUE, ]; diff --git a/src/Plugin/Linkit/Matcher/NodeMatcher.php b/src/Plugin/Linkit/Matcher/NodeMatcher.php index bee20ec8c4450d2586ba720586e8f71bae7f947c..6a3d81a3e4701347905d2d8bbbb7a894dec4415d 100644 --- a/src/Plugin/Linkit/Matcher/NodeMatcher.php +++ b/src/Plugin/Linkit/Matcher/NodeMatcher.php @@ -53,11 +53,17 @@ class NodeMatcher extends EntityMatcher { public function buildConfigurationForm(array $form, FormStateInterface $form_state) { $form = parent::buildConfigurationForm($form, $form_state); - $form['include_unpublished'] = [ + $form['unpublished_nodes'] = array( + '#type' => 'details', + '#title' => t('Unpublished nodes'), + '#open' => TRUE, + ); + + $form['unpublished_nodes']['include_unpublished'] = [ '#title' => t('Include unpublished nodes'), '#type' => 'checkbox', '#default_value' => $this->configuration['include_unpublished'], - '#description' => t('In order to see unpublished nodes, the requesting user must also have permissions to do so.'), + '#description' => t('In order to see unpublished nodes, users must also have permissions to do so.'), ]; return $form; diff --git a/src/Plugin/Linkit/Matcher/TermMatcher.php b/src/Plugin/Linkit/Matcher/TermMatcher.php index 7f73c690917260d1700c758e900e7c50a528bfda..fcab6bea99a27b281d40334955416cd295a2e399 100644 --- a/src/Plugin/Linkit/Matcher/TermMatcher.php +++ b/src/Plugin/Linkit/Matcher/TermMatcher.php @@ -40,7 +40,7 @@ class TermMatcher extends EntityMatcher { * {@inheritdoc} */ protected function buildDescription(EntityInterface $entity) { - $description = \Drupal::token()->replace($this->configuration['result_description'], ['term' => $entity], []); + $description = \Drupal::token()->replace($this->configuration['metadata'], ['term' => $entity], []); return LinkitXss::descriptionFilter($description); } diff --git a/src/Plugin/Linkit/Matcher/UserMatcher.php b/src/Plugin/Linkit/Matcher/UserMatcher.php index d937bc53da287adc96895f29141c35cf4ba2bb12..ea1e74620b9d3fd561f1c952e7383bcf63b578d7 100644 --- a/src/Plugin/Linkit/Matcher/UserMatcher.php +++ b/src/Plugin/Linkit/Matcher/UserMatcher.php @@ -60,20 +60,33 @@ class UserMatcher extends EntityMatcher { public function buildConfigurationForm(array $form, FormStateInterface $form_state) { $form = parent::buildConfigurationForm($form, $form_state); - $form['roles'] = [ + $form['role_restrictions'] = array( + '#type' => 'details', + '#title' => t('Role restrictions'), + '#open' => TRUE, + '#weight' => -90, + ); + + $form['role_restrictions']['roles'] = [ '#type' => 'checkboxes', '#title' => $this->t('Restrict to the selected roles'), '#options' => array_diff_key(user_role_names(TRUE), [RoleInterface::AUTHENTICATED_ID => RoleInterface::AUTHENTICATED_ID]), '#default_value' => $this->configuration['roles'], - '#description' => $this->t('If none of the checkboxes is checked, allow all roles.'), + '#description' => $this->t('If none of the checkboxes is checked, all roles are allowed.'), '#element_validate' => [[get_class($this), 'elementValidateFilter']], ]; - $form['include_blocked'] = [ + $form['blocked_users'] = array( + '#type' => 'details', + '#title' => t('Blocked users'), + '#open' => TRUE, + ); + + $form['blocked_users']['include_blocked'] = [ '#title' => t('Include blocked user'), '#type' => 'checkbox', '#default_value' => $this->configuration['include_blocked'], - '#description' => t('In order to see blocked users, the requesting user must also have permissions to do so.'), + '#description' => t('In order to see blocked users, users must have permissions to do so.'), ]; return $form; diff --git a/src/Tests/Update/LinkitUpdate8501.php b/src/Tests/Update/LinkitUpdate8501.php deleted file mode 100644 index cadbec6670820e1b3391379bc7ac6fc67b914df7..0000000000000000000000000000000000000000 --- a/src/Tests/Update/LinkitUpdate8501.php +++ /dev/null @@ -1,58 +0,0 @@ -configFactory = $this->container->get('config.factory'); - } - - /** - * Set database dump files to be used. - */ - protected function setDatabaseDumpFiles() { - $this->databaseDumpFiles = [ - __DIR__ . '/../../../tests/fixtures/update/linkit-4-to-5/drupal-8.linkit-enabled.standard.php.gz', - __DIR__ . '/../../../tests/fixtures/update/8501/linkit-update-8501.php', - ]; - } - - /** - * Tests linkit_update_8501(). - * - * @see linkit_update_8501() - */ - public function testLinkitUpdate8501() { - $this->runUpdates(); - - $test_profile = $this->configFactory->get('linkit.linkit_profile.test_profile'); - $this->assertEqual('canonical', $test_profile->get('matchers.fc48c807-2a9c-44eb-b86b-7e134c1aa252.settings.substitution_type'), 'Content matcher has a substitution type of canonical.'); - $this->assertEqual('file', $test_profile->get('matchers.b8d6d672-6377-493f-b492-3cc69511cf17.settings.substitution_type'), 'File matcher has a substitution type of file.'); - - $htmlRestrictions = FilterFormat::load('format_1')->getHtmlRestrictions(); - $this->assertTrue(array_key_exists("data-entity-type", $htmlRestrictions['allowed']['a'])); - $this->assertTrue(array_key_exists("data-entity-uuid", $htmlRestrictions['allowed']['a'])); - $this->assertTrue(array_key_exists("data-entity-substitution", $htmlRestrictions['allowed']['a'])); - } - -} diff --git a/src/Tests/Update/LinkitUpdateTest.php b/src/Tests/Update/LinkitUpdateTest.php index 66b39ad2d648067d8a4ae54adcd6288d2e7e2144..a17bd80bc42f48741f0db669f82535f396393f85 100644 --- a/src/Tests/Update/LinkitUpdateTest.php +++ b/src/Tests/Update/LinkitUpdateTest.php @@ -32,8 +32,8 @@ class LinkitUpdateTest extends UpdatePathTestBase { */ protected function setDatabaseDumpFiles() { $this->databaseDumpFiles = [ - __DIR__ . '/../../../tests/fixtures/update/linkit-4-to-5/drupal-8.linkit-enabled.standard.php.gz', - __DIR__ . '/../../../tests/fixtures/update/linkit-4-to-5/linkit-4-to-5.php', + __DIR__ . '/../../../tests/fixtures/update/drupal-8.linkit-enabled.standard.php.gz', + __DIR__ . '/../../../tests/fixtures/update/linkit-additions.php', ]; } @@ -98,4 +98,38 @@ class LinkitUpdateTest extends UpdatePathTestBase { $this->assertTrue(array_key_exists("data-entity-uuid", $htmlRestrictions['allowed']['a'])); } + /** + * Tests linkit_update_8501(). + * + * @see linkit_update_8501() + */ + public function testLinkitUpdate8501() { + $this->runUpdates(); + + $test_profile = $this->configFactory->get('linkit.linkit_profile.test_profile'); + $this->assertEqual('canonical', $test_profile->get('matchers.fc48c807-2a9c-44eb-b86b-7e134c1aa252.settings.substitution_type'), 'Content matcher has a substitution type of canonical.'); + $this->assertEqual('file', $test_profile->get('matchers.b8d6d672-6377-493f-b492-3cc69511cf17.settings.substitution_type'), 'File matcher has a substitution type of file.'); + + $htmlRestrictions = FilterFormat::load('format_1')->getHtmlRestrictions(); + $this->assertTrue(array_key_exists("data-entity-type", $htmlRestrictions['allowed']['a'])); + $this->assertTrue(array_key_exists("data-entity-uuid", $htmlRestrictions['allowed']['a'])); + $this->assertTrue(array_key_exists("data-entity-substitution", $htmlRestrictions['allowed']['a'])); + } + + /** + * Tests linkit_update_8502(). + * + * @see linkit_update_8502() + */ + public function testLinkitUpdate8502() { + $test_profile = $this->configFactory->get('linkit.linkit_profile.test_profile'); + $this->assertNotNull($test_profile->get('matchers.fc48c807-2a9c-44eb-b86b-7e134c1aa252.settings.result_description'), 'Profile have result_description'); + + $this->runUpdates(); + + $test_profile = $this->configFactory->get('linkit.linkit_profile.test_profile'); + $this->assertNull($test_profile->get('matchers.fc48c807-2a9c-44eb-b86b-7e134c1aa252.settings.result_description'), 'Profile does not have result_description'); + $this->assertNotNull($test_profile->get('matchers.fc48c807-2a9c-44eb-b86b-7e134c1aa252.settings.metadata'), 'Profile have metadata'); + } + } diff --git a/tests/fixtures/update/8501/editor.editor.format_1.yml b/tests/fixtures/update/8501/editor.editor.format_1.yml deleted file mode 100644 index 46a0f3f207918c10b0415e9045934a289b48d928..0000000000000000000000000000000000000000 --- a/tests/fixtures/update/8501/editor.editor.format_1.yml +++ /dev/null @@ -1,25 +0,0 @@ -uuid: 5600b759-8f91-49fa-88f0-a69f4c8ed440 -langcode: en -status: true -dependencies: - config: - - filter.format.format_1 - module: - - ckeditor -format: format_1 -editor: ckeditor -settings: - toolbar: - rows: - - - - - name: Links - items: - - Linkit - plugins: - stylescombo: - styles: '' - language: - language_list: un - linkit: - linkit_profile: test_profile diff --git a/tests/fixtures/update/8501/filter.format.format_1.yml b/tests/fixtures/update/8501/filter.format.format_1.yml deleted file mode 100644 index 619bba2224e6ec184c2be7d52f19c48bdfe10e98..0000000000000000000000000000000000000000 --- a/tests/fixtures/update/8501/filter.format.format_1.yml +++ /dev/null @@ -1,17 +0,0 @@ -uuid: ff6b71a0-5051-4857-a0a8-28a670b7317d -langcode: en -status: true -dependencies: { } -name: 'Format 1' -format: format_1 -weight: 0 -filters: - filter_html: - id: filter_html - provider: filter - status: true - weight: -10 - settings: - allowed_html: '
    1. ' - filter_html_help: true - filter_html_nofollow: false diff --git a/tests/fixtures/update/8501/linkit-update-8501.php b/tests/fixtures/update/8501/linkit-update-8501.php deleted file mode 100644 index d7bdc2bb9b1c386e20169502ff6524fab836bda4..0000000000000000000000000000000000000000 --- a/tests/fixtures/update/8501/linkit-update-8501.php +++ /dev/null @@ -1,66 +0,0 @@ -insert('config') - ->fields([ - 'collection', - 'name', - 'data', - ]) - ->values([ - 'collection' => '', - 'name' => 'linkit.linkit_profile.' . $config['id'], - 'data' => serialize($config), - ]) - ->execute(); - - -// Configuration for text formats. -$configs = []; -$configs[] = Yaml::decode(file_get_contents(__DIR__ . '/filter.format.format_1.yml')); -foreach ($configs as $config) { - $connection->insert('config') - ->fields([ - 'collection', - 'name', - 'data', - ]) - ->values([ - 'collection' => '', - 'name' => 'filter.format.' . $config['format'], - 'data' => serialize($config), - ]) - ->execute(); -} - -// Configuration for editors. -$configs = []; -$configs[] = Yaml::decode(file_get_contents(__DIR__ . '/editor.editor.format_1.yml')); -foreach ($configs as $config) { - $connection->insert('config') - ->fields([ - 'collection', - 'name', - 'data', - ]) - ->values([ - 'collection' => '', - 'name' => 'editor.editor.' . $config['format'], - 'data' => serialize($config), - ]) - ->execute(); -} diff --git a/tests/fixtures/update/linkit-4-to-5/drupal-8.linkit-enabled.standard.php.gz b/tests/fixtures/update/drupal-8.linkit-enabled.standard.php.gz similarity index 100% rename from tests/fixtures/update/linkit-4-to-5/drupal-8.linkit-enabled.standard.php.gz rename to tests/fixtures/update/drupal-8.linkit-enabled.standard.php.gz diff --git a/tests/fixtures/update/linkit-4-to-5/editor.editor.format_1.yml b/tests/fixtures/update/editor.editor.format_1.yml similarity index 100% rename from tests/fixtures/update/linkit-4-to-5/editor.editor.format_1.yml rename to tests/fixtures/update/editor.editor.format_1.yml diff --git a/tests/fixtures/update/linkit-4-to-5/editor.editor.format_2.yml b/tests/fixtures/update/editor.editor.format_2.yml similarity index 100% rename from tests/fixtures/update/linkit-4-to-5/editor.editor.format_2.yml rename to tests/fixtures/update/editor.editor.format_2.yml diff --git a/tests/fixtures/update/linkit-4-to-5/editor.editor.format_3.yml b/tests/fixtures/update/editor.editor.format_3.yml similarity index 100% rename from tests/fixtures/update/linkit-4-to-5/editor.editor.format_3.yml rename to tests/fixtures/update/editor.editor.format_3.yml diff --git a/tests/fixtures/update/linkit-4-to-5/filter.format.format_1.yml b/tests/fixtures/update/filter.format.format_1.yml similarity index 100% rename from tests/fixtures/update/linkit-4-to-5/filter.format.format_1.yml rename to tests/fixtures/update/filter.format.format_1.yml diff --git a/tests/fixtures/update/linkit-4-to-5/filter.format.format_2.yml b/tests/fixtures/update/filter.format.format_2.yml similarity index 100% rename from tests/fixtures/update/linkit-4-to-5/filter.format.format_2.yml rename to tests/fixtures/update/filter.format.format_2.yml diff --git a/tests/fixtures/update/linkit-4-to-5/filter.format.format_3.yml b/tests/fixtures/update/filter.format.format_3.yml similarity index 100% rename from tests/fixtures/update/linkit-4-to-5/filter.format.format_3.yml rename to tests/fixtures/update/filter.format.format_3.yml diff --git a/tests/fixtures/update/linkit-4-to-5/linkit.linkit_profile.test_profile.yml b/tests/fixtures/update/linkit-4-to-5/linkit.linkit_profile.test_profile.yml deleted file mode 100644 index bee4523d0cfbc3e4ac785165bc109d1ab351a3f5..0000000000000000000000000000000000000000 --- a/tests/fixtures/update/linkit-4-to-5/linkit.linkit_profile.test_profile.yml +++ /dev/null @@ -1,47 +0,0 @@ -uuid: e91c2255-2146-46fb-af58-1b391113c352 -langcode: en -status: true -dependencies: - module: - - file - - node -id: test_profile -label: 'Test profile' -description: 'This is a test profile' -attributes: - target: - id: target - weight: 0 - settings: - widget_type: simple_checkbox - title: - id: title - weight: 0 - settings: - automatic_title: false - accesskey: - id: accesskey - weight: 0 - settings: { } -matchers: - fc48c807-2a9c-44eb-b86b-7e134c1aa252: - uuid: fc48c807-2a9c-44eb-b86b-7e134c1aa252 - id: 'entity:node' - weight: 0 - settings: - result_description: 'by [node:author] | [node:created:medium]' - bundles: { } - group_by_bundle: false - include_unpublished: false - b8d6d672-6377-493f-b492-3cc69511cf17: - uuid: b8d6d672-6377-493f-b492-3cc69511cf17 - id: 'entity:file' - weight: 0 - settings: - result_description: '[file:path] [file:url]' - bundles: null - group_by_bundle: null - images: - show_dimensions: false - show_thumbnail: false - thumbnail_image_style: null diff --git a/tests/fixtures/update/linkit-4-to-5/linkit-4-to-5.php b/tests/fixtures/update/linkit-additions.php similarity index 94% rename from tests/fixtures/update/linkit-4-to-5/linkit-4-to-5.php rename to tests/fixtures/update/linkit-additions.php index 4e661ff5323a9f129ad3e68eddfd2b8308fd463d..7e57ee4283474d1de99127b210f79fff0f25c1bd 100644 --- a/tests/fixtures/update/linkit-4-to-5/linkit-4-to-5.php +++ b/tests/fixtures/update/linkit-additions.php @@ -2,10 +2,10 @@ /** * @file - * Database fixture for testing the upgrade path for Linkit 4 to 5. + * Database fixture for testing the update hooks. * * Contains database additions to drupal-8.bare.standard.php.gz for testing the - * upgrade path for Linkit 4 to 5. + * update hooks. */ use Drupal\Component\Serialization\Yaml; diff --git a/tests/fixtures/update/8501/linkit.linkit_profile.test_profile.yml b/tests/fixtures/update/linkit.linkit_profile.test_profile.yml similarity index 100% rename from tests/fixtures/update/8501/linkit.linkit_profile.test_profile.yml rename to tests/fixtures/update/linkit.linkit_profile.test_profile.yml