trait IntelligenceMetadataFormTestTrait in Lingotek Translation 3.5.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
- 4.0.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
- 3.0.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
- 3.1.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
- 3.2.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
- 3.3.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
- 3.4.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
- 3.6.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
- 3.7.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
- 3.8.x tests/src/Functional/Form/IntelligenceMetadataFormTestTrait.php \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
Utility methods for testing the intelligence metadata forms.
@package Drupal\Tests\lingotek\Functional\Form
Hierarchy
- trait \Drupal\Tests\lingotek\Functional\Form\IntelligenceMetadataFormTestTrait
1 file declares its use of IntelligenceMetadataFormTestTrait
- LingotekIntelligenceMetadataTranslationTest.php in tests/
src/ Functional/ LingotekIntelligenceMetadataTranslationTest.php
File
- tests/
src/ Functional/ Form/ IntelligenceMetadataFormTestTrait.php, line 10
Namespace
Drupal\Tests\lingotek\Functional\FormView source
trait IntelligenceMetadataFormTestTrait {
/**
* Assert field defaults are correct.
*/
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]', '');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
IntelligenceMetadataFormTestTrait:: |
protected | function | Assert field defaults are correct. |