diff --git a/crm_core/contact/src/Tests/EventProcessingTest.php b/crm/src/Tests/EventProcessingTest.php similarity index 97% rename from crm_core/contact/src/Tests/EventProcessingTest.php rename to crm/src/Tests/EventProcessingTest.php index 0755935..5dea8c3 100644 --- a/crm_core/contact/src/Tests/EventProcessingTest.php +++ b/crm/src/Tests/EventProcessingTest.php @@ -1,10 +1,10 @@ installConfig(array( 'crm_core_contact', 'crm_core_activity', - 'collect_crm_core_contact', + 'collect_crm', 'collect', )); diff --git a/crm_core/contact/src/Tests/ProcessContactTest.php b/crm/src/Tests/ProcessContactTest.php similarity index 90% rename from crm_core/contact/src/Tests/ProcessContactTest.php rename to crm/src/Tests/ProcessContactTest.php index 158dd3d..6524823 100644 --- a/crm_core/contact/src/Tests/ProcessContactTest.php +++ b/crm/src/Tests/ProcessContactTest.php @@ -1,10 +1,10 @@ drupalPostForm(NULL, ['operation' => 'single', 'entity' => 'Cookie (' . $entity->id() . ')'], t('Capture')); $this->assertText('The Test entity entity has been captured'); - // Create suggested schema. - $this->clickLink('Set up a Collect JSON schema'); + // Create suggested model. + $this->clickLink(t('Set up a @plugin model', ['@plugin' => t('Collect JSON')])); $this->drupalPostForm(NULL, ['label' => 'User entity', 'id' => 'user_entity'], t('Save')); - // Edit schema processing workflow. - $this->drupalGet('admin/structure/collect-schemas/user_entity/processing'); + // Edit model processing workflow. + $this->drupalGet('admin/structure/collect/model/manage/user_entity/processing'); $this->drupalPostForm(NULL, ['processor_add_select' => 'contact_matcher'], t('Add')); $this->drupalPostForm(NULL, ['processor_add_select' => 'contact_matcher'], t('Add')); $this->drupalPostForm(NULL, ['processor_add_select' => 'activity_creator'], t('Add')); @@ -125,9 +125,9 @@ class ProcessContactTest extends WebTestBase { ], t('Save')); $this->drupalPostForm(NULL, [ // The donor is identified by email. - 'processors[' . $contact_matcher_from_uuid . '][settings][fields][contact_mail][schema_property]' => 'donor', + 'processors[' . $contact_matcher_from_uuid . '][settings][fields][contact_mail][model_property]' => 'donor', // The recipient is identified by name. - 'processors[' . $contact_matcher_to_uuid . '][settings][fields][name][schema_property]' => 'recipient', + 'processors[' . $contact_matcher_to_uuid . '][settings][fields][name][model_property]' => 'recipient', ], t('Save')); // Execute processing on the entity container. @@ -206,15 +206,15 @@ class ProcessContactTest extends WebTestBase { $this->drupalPostForm('admin/content/collect/capture', ['entity_type' => 'node'], t('Select entity type')); $this->drupalPostForm(NULL, ['operation' => 'single', 'entity' => 'Foo (' . $entity->id() . ')'], t('Capture')); - // Create suggested schema. - $this->clickLink('Set up a Collect JSON schema'); + // Create suggested model. + $this->clickLink(t('Set up a @plugin model', ['@plugin' => t('Collect JSON')])); $this->drupalPostForm(NULL, [ 'label' => 'Content entity', 'id' => 'collect_json_node_article' ], t('Save')); // Add a new contact matcher processor. - $this->drupalGet('admin/structure/collect-schemas/collect_json_node_article/processing'); + $this->drupalGet('admin/structure/collect/model/manage/collect_json_node_article/processing'); $this->drupalPostForm(NULL, ['processor_add_select' => 'contact_matcher'], t('Add')); list($contact_matcher_uuid) = $this->getProcessorKeys(); $this->drupalPostForm(NULL, [ @@ -260,14 +260,14 @@ class ProcessContactTest extends WebTestBase { $author->save(); $author_container = \Drupal::service('collect.capture_entity')->capture($author); $this->drupalGet($author_container->url()); - $this->clickLink(t('Set up a @plugin schema', ['@plugin' => t('Collect JSON')])); + $this->clickLink(t('Set up a @plugin model', ['@plugin' => t('Collect JSON')])); $this->drupalPostForm(NULL, ['label' => 'User', 'id' => 'user'], t('Save')); - $this->drupalPostAjaxForm('admin/structure/collect-schemas/user/processing', ['processor_add_select' => 'contact_matcher'], ['op' => t('Add')]); + $this->drupalPostAjaxForm('admin/structure/collect/model/manage/user/processing', ['processor_add_select' => 'contact_matcher'], ['op' => t('Add')]); list($contact_matcher_uuid) = $this->getProcessorKeys(); $this->drupalPostForm(NULL, ['processors[' . $contact_matcher_uuid . '][settings][contact_type]' => 'individual'], t('Save')); $this->drupalPostForm(NULL, [ - 'processors[' . $contact_matcher_uuid . '][settings][fields][name][schema_property]' => 'name', - 'processors[' . $contact_matcher_uuid . '][settings][fields][contact_mail][schema_property]' => 'mail', + 'processors[' . $contact_matcher_uuid . '][settings][fields][name][model_property]' => 'name', + 'processors[' . $contact_matcher_uuid . '][settings][fields][contact_mail][model_property]' => 'mail', ], t('Save')); \Drupal::service('collect.postprocessor')->process($author_container); $this->drupalGet('crm-core/contact'); diff --git a/crm_core/contact/tests/src/Unit/EventSubscriberTest.php b/crm/tests/src/Unit/EventSubscriberTest.php similarity index 97% rename from crm_core/contact/tests/src/Unit/EventSubscriberTest.php rename to crm/tests/src/Unit/EventSubscriberTest.php index fa235ed..18d2717 100644 --- a/crm_core/contact/tests/src/Unit/EventSubscriberTest.php +++ b/crm/tests/src/Unit/EventSubscriberTest.php @@ -1,13 +1,13 @@