You are here

public function WebformLocalizationSubmissionTestCase::webformPost in Webform Localization 7.4

Get values to submit to the test webform.

1 call to WebformLocalizationSubmissionTestCase::webformPost()
WebformLocalizationSubmissionTestCase::webformSubmissionExecute in tests/webform_localization.submission.test
Execute the submission test.

File

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

Class

WebformLocalizationSubmissionTestCase
Abstract class that defines the actual tests.

Code

public function webformPost($value_type = 'sample') {
  $submission_values_list = $value_type == 'sample' ? $this->wtc
    ->webformPost() : array();
  foreach ($submission_values_list as $submission_key => $submission_value) {
    $skipped = FALSE;
    foreach ($this
      ->skippedComponents() as $skip) {
      if (substr_count($submission_key, $skip) > 0) {
        $skipped = TRUE;
      }
    }
    if (!$skipped) {
      $submission_values[$submission_key] = $submission_value;
    }
  }
  return $submission_values;
}