function ExposedFormTest::testRememberSelected
Same name in other branches
- 9 core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php \Drupal\Tests\views\Functional\Plugin\ExposedFormTest::testRememberSelected()
- 11.x core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php \Drupal\Tests\views\Functional\Plugin\ExposedFormTest::testRememberSelected()
Tests the "Remember the last selection" functionality.
1 call to ExposedFormTest::testRememberSelected()
- ExposedFormTest::testExposedForm in core/
modules/ views/ tests/ src/ Functional/ Plugin/ ExposedFormTest.php - Tests the input required exposed form type.
File
-
core/
modules/ views/ tests/ src/ Functional/ Plugin/ ExposedFormTest.php, line 559
Class
- ExposedFormTest
- Tests exposed forms functionality.
Namespace
Drupal\Tests\views\Functional\PluginCode
protected function testRememberSelected() : void {
$this->drupalGet('test_remember_selected');
$this->getSession()
->getPage()
->fillField('type', 'page');
$this->getSession()
->getPage()
->pressButton('Apply');
// Reload the page and ensure the filter is selected.
$this->drupalGet('test_remember_selected');
$this->assertTrue($this->assertSession()
->optionExists('type', 'page')
->isSelected());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.