function ElementsTableSelectTest::testMultipleFalse
Tests the display of radios when #multiple is FALSE.
File
-
core/
modules/ system/ tests/ src/ Functional/ Form/ ElementsTableSelectTest.php, line 50
Class
- ElementsTableSelectTest
- Tests the tableselect form element for expected behavior.
Namespace
Drupal\Tests\system\Functional\FormCode
public function testMultipleFalse() : void {
$this->drupalGet('form_test/tableselect/multiple-false');
$this->assertSession()
->pageTextNotContains('Empty text.');
// Test for the absence of the Select all rows tableheader.
$this->assertSession()
->elementNotExists('xpath', '//th[@class="select-all"]');
$this->assertSession()
->elementExists('xpath', '//input[@type="radio" and @value="row1"]');
$this->assertSession()
->elementExists('xpath', '//input[@type="radio" and @value="row2"]');
$this->assertSession()
->elementExists('xpath', '//input[@type="radio" and @value="row3"]');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.