public function ElementsVerticalTabsTest::testDefaultTabCleaned in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php \Drupal\Tests\system\Functional\Form\ElementsVerticalTabsTest::testDefaultTabCleaned()
- 9 core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php \Drupal\Tests\system\Functional\Form\ElementsVerticalTabsTest::testDefaultTabCleaned()
Ensures that vertical tab form values are cleaned.
File
- core/
modules/ system/ tests/ src/ Functional/ Form/ ElementsVerticalTabsTest.php, line 92
Class
- ElementsVerticalTabsTest
- Tests the vertical_tabs form element for expected behavior.
Namespace
Drupal\Tests\system\Functional\FormCode
public function testDefaultTabCleaned() {
$this
->drupalGet('form_test/form-state-values-clean');
$this
->submitForm([], 'Submit');
$values = Json::decode($this
->getSession()
->getPage()
->getContent());
$this
->assertFalse(isset($values['vertical_tabs__active_tab']), new FormattableMarkup('%element was removed.', [
'%element' => 'vertical_tabs__active_tab',
]));
}