You are here

protected function FormStateTest::formStateSecondPageProcessedStub in Little helpers 7

Same name and namespace in other branches
  1. 7.2 tests/Webform/FormStateTest.php \Drupal\little_helpers\Test\Webform\FormStateTest::formStateSecondPageProcessedStub()

Get a form_state stub that was observed after submitting the second step.

File

tests/Webform/FormStateTest.php, line 86

Class

FormStateTest
Test creating a submission object from various form states.

Namespace

Drupal\little_helpers\Test\Webform

Code

protected function formStateSecondPageProcessedStub() {
  $form_state = array(
    'values' => array(
      'details' => array(
        'nid' => $this->webformNode->nid,
        'sid' => NULL,
        'uid' => '1',
        'page_num' => 2,
        'page_count' => 3,
        'finished' => 0,
      ),
      'op' => 'Next',
      'submitted' => array(
        1 => 'Myfirstname',
        3 => 'myemail@address.at',
        15 => '01/1234568',
        7 => 'Page break',
        18 => '987654321',
        14 => 'Mylastname',
        13 => 'some text for the textfield',
      ),
    ),
    'webform' => array(
      'component_tree' => array(
        'children' => $this->webformNode->webform['components'],
      ),
      'page_num' => 1,
      'page_count' => 3,
    ),
    'clicked_button' => array(
      '#parents' => array(
        0 => 'next',
      ),
    ),
  );
  return $form_state;
}