You are here

public function WebformLocalizationSubmissionTestCase::createTranslationNodes in Webform Localization 7.4

Create the translated webform nodes.

1 call to WebformLocalizationSubmissionTestCase::createTranslationNodes()
WebformLocalizationSubmissionTestCase::testLocalizedSubmission in tests/webform_localization.submission.test
Create a webform with translations, and performs some submissions.

File

tests/webform_localization.submission.test, line 84
This file contains test classes for testing localized webform submissions.

Class

WebformLocalizationSubmissionTestCase
Abstract class that defines the actual tests.

Code

public function createTranslationNodes() {

  // Create the translation nodes:
  // Submit translation in Spanish.
  $node_translation_title = 'Webform title in Spanish';
  $node_translation_body = 'Content in Spanish';
  $this->nodeTranslation1 = $this
    ->createWebformTranslation($this
    ->createWebformForm(), $node_translation_title, $node_translation_body, 'es');

  // Submit translation in German.
  $node_translation_title = 'Webform title in German';
  $node_translation_body = 'Content in German';
  $this->nodeTranslation2 = $this
    ->createWebformTranslation($this
    ->createWebformForm(), $node_translation_title, $node_translation_body, 'de');
}