public function ForcePasswordChangeBrowserTestBase::selectSelectOption in Force Password Change 2.0.x
Same name and namespace in other branches
- 8 tests/src/Functional/ForcePasswordChangeBrowserTestBase.php \Drupal\Tests\force_password_change\Functional\ForcePasswordChangeBrowserTestBase::selectSelectOption()
2 calls to ForcePasswordChangeBrowserTestBase::selectSelectOption()
- ForcePasswordChangeAdminUiTest::testForcePasswordChangeAdminPage in tests/
src/ Functional/ ForcePasswordChangeAdminUiTest.php - Test that the admin UI page is properly linked to, that all the required elements exist, and that the form is working properly.
- ForcePasswordChangeFunctionalityTest::testAuthenticatedUserPasswordExpire in tests/
src/ Functional/ ForcePasswordChangeFunctionalityTest.php
File
- tests/
src/ Functional/ ForcePasswordChangeBrowserTestBase.php, line 120
Class
- ForcePasswordChangeBrowserTestBase
- Provides some helper functions for functional tests.
Namespace
Drupal\Tests\force_password_change\FunctionalCode
public function selectSelectOption($selectElementHtmlID, $value) {
if (preg_match('/^#/', $selectElementHtmlID)) {
$selectElementHtmlID = substr($selectElementHtmlID, 1);
}
$this
->getSession()
->getDriver()
->selectOption('//select[@id="' . $selectElementHtmlID . '"]', $value);
}