function ElementsTableSelectTest::testMultipleFalseSubmit

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php \Drupal\Tests\system\Functional\Form\ElementsTableSelectTest::testMultipleFalseSubmit()
  2. 8.9.x core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php \Drupal\Tests\system\Functional\Form\ElementsTableSelectTest::testMultipleFalseSubmit()
  3. 10 core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php \Drupal\Tests\system\Functional\Form\ElementsTableSelectTest::testMultipleFalseSubmit()

Tests submission of values when #multiple is FALSE.

File

core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php, line 125

Class

ElementsTableSelectTest
Tests the tableselect form element for expected behavior.

Namespace

Drupal\Tests\system\Functional\Form

Code

public function testMultipleFalseSubmit() : void {
    $edit['tableselect'] = 'row1';
    $this->drupalGet('form_test/tableselect/multiple-false');
    $this->submitForm($edit, 'Submit');
    $this->assertSession()
        ->pageTextContains('Submitted: row1');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.