You are here

protected function LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
  2. 3.0.x tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
  3. 3.1.x tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
  4. 3.2.x tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
  5. 3.3.x tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
  6. 3.4.x tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
  7. 3.5.x tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
  8. 3.6.x tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
  9. 3.7.x tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
  10. 3.8.x tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
2 calls to LingotekIntelligenceMetadataTranslationTest::setupIntelligenceProfileSettings()
LingotekIntelligenceMetadataTranslationTest::testUpdateNodeWithProfileOverride in tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php
LingotekIntelligenceMetadataTranslationTest::testUploadNodeWithProfileOverride in tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php

File

tests/src/Functional/LingotekIntelligenceMetadataTranslationTest.php, line 738

Class

LingotekIntelligenceMetadataTranslationTest
Tests if intelligence metadata is used when uploading and updating content.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function setupIntelligenceProfileSettings() {
  $this
    ->drupalGet('admin/lingotek/settings');
  $this
    ->clickLink(t('Add new Translation Profile'));
  $edit = [
    'id' => 'intelligent_profile',
    'label' => 'Intelligent Profile',
    'auto_upload' => 1,
    'auto_download' => 1,
    'intelligence_metadata_overrides[override]' => 1,
    'intelligence_metadata[use_author]' => 1,
    'intelligence_metadata[use_author_email]' => 1,
    'intelligence_metadata[use_contact_email_for_author]' => FALSE,
    'intelligence_metadata[use_business_unit]' => 1,
    'intelligence_metadata[use_business_division]' => 1,
    'intelligence_metadata[use_campaign_id]' => 1,
    'intelligence_metadata[use_campaign_rating]' => 1,
    'intelligence_metadata[use_channel]' => 1,
    'intelligence_metadata[use_contact_name]' => 1,
    'intelligence_metadata[use_contact_email]' => 1,
    'intelligence_metadata[use_content_description]' => 1,
    'intelligence_metadata[use_external_style_id]' => 1,
    'intelligence_metadata[use_purchase_order]' => 1,
    'intelligence_metadata[use_region]' => 1,
    'intelligence_metadata[use_base_domain]' => 1,
    'intelligence_metadata[use_reference_url]' => 1,
    'intelligence_metadata[default_author_email]' => 'test@example.com',
    'intelligence_metadata[business_unit]' => 'Profile Business Unit',
    'intelligence_metadata[business_division]' => 'Profile Business Division',
    'intelligence_metadata[campaign_id]' => 'Profile Campaign ID',
    'intelligence_metadata[campaign_rating]' => 4,
    'intelligence_metadata[channel]' => 'Profile Channel Test',
    'intelligence_metadata[contact_name]' => 'Profile Test Contact Name',
    'intelligence_metadata[contact_email]' => 'profile@example.com',
    'intelligence_metadata[content_description]' => 'Profile Content description',
    'intelligence_metadata[external_style_id]' => 'profile-my-style-id',
    'intelligence_metadata[purchase_order]' => 'Profile PO42',
    'intelligence_metadata[region]' => 'region2',
  ];
  $this
    ->drupalPostForm(NULL, $edit, t('Save'));
}