function FapiExampleTest::doTestVerticalTabsDemoForm

Same name in other branches
  1. 3.x modules/form_api_example/tests/src/Functional/FapiExampleTest.php \Drupal\Tests\form_api_example\Functional\FapiExampleTest::doTestVerticalTabsDemoForm()
  2. 4.0.x modules/form_api_example/tests/src/Functional/FapiExampleTest.php \Drupal\Tests\form_api_example\Functional\FapiExampleTest::doTestVerticalTabsDemoForm()

Test the vertical tabs demo form.

1 call to FapiExampleTest::doTestVerticalTabsDemoForm()
FapiExampleTest::testFunctional in form_api_example/tests/src/Functional/FapiExampleTest.php
Aggregate all the tests.

File

form_api_example/tests/src/Functional/FapiExampleTest.php, line 261

Class

FapiExampleTest
Ensure that the form_api_example forms work properly.

Namespace

Drupal\Tests\form_api_example\Functional

Code

public function doTestVerticalTabsDemoForm() {
    $assert = $this->assertSession();
    // Post the form.
    $edit = [
        'name' => 'Dave',
        'publisher' => 'me',
    ];
    $this->drupalPostForm(Url::fromRoute('form_api_example.container_demo'), $edit, 'Submit');
    $assert->pageTextContains('Value for name: Dave');
    $assert->pageTextContains('Value for publisher: me');
}