public function ElementsTableSelectTest::testMultipleFalse in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php \Drupal\Tests\system\Functional\Form\ElementsTableSelectTest::testMultipleFalse()
- 10 core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php \Drupal\Tests\system\Functional\Form\ElementsTableSelectTest::testMultipleFalse()
Test the display of radios when #multiple is FALSE.
File
- core/
modules/ system/ tests/ src/ Functional/ Form/ ElementsTableSelectTest.php, line 48
Class
- ElementsTableSelectTest
- Tests the tableselect form element for expected behavior.
Namespace
Drupal\Tests\system\Functional\FormCode
public function testMultipleFalse() {
$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"]');
$rows = [
'row1',
'row2',
'row3',
];
foreach ($rows as $row) {
$this
->assertNotEmpty($this
->xpath('//input[@type="radio"]', [
$row,
], "Radio button value: {$row}"));
}
}