public function WebformLocalizationSubmissionTestCase::testLocalizedSubmission in Webform Localization 7.4
Create a webform with translations, and performs some submissions.
File
- tests/
webform_localization.submission.test, line 47 - This file contains test classes for testing localized webform submissions.
Class
- WebformLocalizationSubmissionTestCase
- Abstract class that defines the actual tests.
Code
public function testLocalizedSubmission() {
// Create the webform node.
$node = $this
->createWebformForm();
// Set the translation method.
$this
->setTranslationOptions();
// Create the translated nodes.
$this
->createTranslationNodes();
// Submit in original language.
$this
->webformSubmissionExecute($node);
// Submit translation 1.
$this
->webformSubmissionExecute($this->nodeTranslation1);
// Submit translation 2.
$this
->webformSubmissionExecute($this->nodeTranslation2);
// Submit translation 2.
$this
->webformSubmissionExecute($this->nodeTranslation2);
// Submit original language once more.
$this
->webformSubmissionExecute($node);
}