You are here

protected function IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
  2. 3.0.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
  3. 3.1.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
  4. 3.2.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
  5. 3.3.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
  6. 3.4.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
  7. 3.5.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
  8. 3.6.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
  9. 3.7.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
  10. 3.8.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()

Assert field defaults are correct.

2 calls to IntelligenceMetadataFormTestTrait::assertIntelligenceFieldDefaults()
LingotekProfileFormTest::testIntelligenceOverrideDefaults in tests/src/Functional/Form/LingotekProfileFormTest.php
Tests that by default intelligence overrides are disabled.
LingotekSettingsTabIntelligenceMetadataFormTest::testIntelligenceMetadataIsSaved in tests/src/Functional/Form/LingotekSettingsTabIntelligenceMetadataFormTest.php
Test intelligence metadata is saved.

File

tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php, line 15

Class

IntelligenceMetadataFormTestTrait
Utility methods for testing the intelligence metadata forms.

Namespace

Drupal\Tests\lingotek\Functional\Form

Code

protected function assertIntelligenceFieldDefaults() {
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-author');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-author-email');
  $this
    ->assertNoFieldChecked('edit-intelligence-metadata-use-contact-email-for-author');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-business-unit');
  $this
    ->assertFieldByName('intelligence_metadata[business_unit]', '');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-business-division');
  $this
    ->assertFieldByName('intelligence_metadata[business_division]', '');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-campaign-id');
  $this
    ->assertFieldByName('intelligence_metadata[campaign_id]', '');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-campaign-rating');
  $this
    ->assertFieldByName('intelligence_metadata[campaign_rating]', '0');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-channel');
  $this
    ->assertFieldByName('intelligence_metadata[channel]', '');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-contact-name');
  $this
    ->assertFieldByName('intelligence_metadata[contact_name]', '');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-contact-email');
  $this
    ->assertFieldByName('intelligence_metadata[contact_email]', '');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-content-description');
  $this
    ->assertFieldByName('intelligence_metadata[content_description]', '');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-base-domain');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-reference-url');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-external-style-id');
  $this
    ->assertFieldByName('intelligence_metadata[external_style_id]', '');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-purchase-order');
  $this
    ->assertFieldByName('intelligence_metadata[purchase_order]', '');
  $this
    ->assertFieldChecked('edit-intelligence-metadata-use-region');
  $this
    ->assertFieldByName('intelligence_metadata[region]', '');
}