diff --git a/tests/src/FunctionalJavascript/ExistingContactElementTest.php b/tests/src/FunctionalJavascript/ExistingContactElementTest.php index 1adf6857..43853a89 100644 --- a/tests/src/FunctionalJavascript/ExistingContactElementTest.php +++ b/tests/src/FunctionalJavascript/ExistingContactElementTest.php @@ -611,16 +611,16 @@ public function testNextPrevSaveLoad() { // Place fields for each contact on their own page and enable saving drafts $webform = Webform::load($this->webform->getOriginalId()); // $elements = Yaml::decode($webform->get('elements')); - $elements = $webform->getElementsDecodedAndFlattened(); - $this->htmlOutput('id is ' . $this->webform->getOriginalId() . ' raw elements is ' . var_export($webform->get('elements'), true) . ' elements is ' . var_export($elements, true)); + $elements = $this->webform->getElementsDecodedAndFlattened(); + $this->htmlOutput('id is ' . $this->webform->getOriginalId() . ' raw elements is ' . var_export($this->webform->get('elements'), true) . ' elements is ' . var_export($elements, true)); $elements_new = [ 'page1' => ['#type' => 'webform_wizard_page', '#title' => 'Page 1', 'civicrm_1_contact_1_fieldset_fieldset' => $elements["civicrm_1_contact_1_fieldset_fieldset"]], 'page2' => ['#type' => 'webform_wizard_page', '#title' => 'Page 2', 'civicrm_2_contact_1_fieldset_fieldset' => $elements["civicrm_2_contact_1_fieldset_fieldset"]], 'page3' => ['#type' => 'webform_wizard_page', '#title' => 'Page 3', 'civicrm_3_contact_1_fieldset_fieldset' => $elements["civicrm_3_contact_1_fieldset_fieldset"]], ]; - $webform->set('elements', Yaml::encode($elements_new)); - $webform->setSetting('draft', 'all'); - $webform->save(); + $this->webform->set('elements', Yaml::encode($elements_new)); + $this->webform->setSetting('draft', 'all'); + $this->webform->save(); $this->drupalGet($this->webform->toUrl('edit-form')); $this->htmlOutput();