You are here

private function FormatterTest::submitNode in Double Field 8.3

Same name and namespace in other branches
  1. 4.x tests/src/FunctionalJavascript/FormatterTest.php \Drupal\Tests\double_field\FunctionalJavascript\FormatterTest::submitNode()

Submits node form.

9 calls to FormatterTest::submitNode()
FormatterTest::testAccordionFormatter in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.
FormatterTest::testBooleanAndString in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.
FormatterTest::testDetailsFormatter in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.
FormatterTest::testEmailAndTelephone in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.
FormatterTest::testFloatAndNumeric in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.

... See full list

File

tests/src/FunctionalJavascript/FormatterTest.php, line 729

Class

FormatterTest
A tests for Double Field formatter.

Namespace

Drupal\Tests\double_field\FunctionalJavascript

Code

private function submitNode() : void {
  $field_values = func_get_args();
  $this
    ->drupalGet($this->nodeAddPath);
  $page = $this
    ->getSession()
    ->getPage();
  $page
    ->fillField('title[0][value]', 'Example');
  foreach ($field_values as $delta => $values) {
    if ($values[0] !== NULL) {
      $page
        ->fillField("{$this->fieldName}[{$delta}][first]", $values[0]);
    }
    if ($values[1] !== NULL) {
      $page
        ->fillField("{$this->fieldName}[{$delta}][second]", $values[1]);
    }
  }
  $page
    ->pressButton('Save');
}