function OpenAtriumAccessBaseTestCase::hasSelectOption in Open Atrium Core 7.2
Check if a select has a certain option.
Parameters
string $name: The name of the select.
string $value: The value of the option to check for.
Return value
boolean TRUE if found; FALSE otherwise.
2 calls to OpenAtriumAccessBaseTestCase::hasSelectOption()
- OpenAtriumAccessTestCase::testGroupAdminPage in modules/
oa_access/ tests/ oa_access.test - OpenAtriumAccessTestCase::testTeamAdminPage in modules/
oa_access/ tests/ oa_access.test
File
- modules/
oa_access/ tests/ oa_access.test, line 226 - Functional tests for the Open Atrium Access module.
Class
Code
function hasSelectOption($name, $value) {
$results = $this
->xpath('//select[@name=:name]//option[@value=:value]', array(
':name' => $name,
':value' => $value,
));
return count($results) > 0;
}