function CountriesBaseSetupTest::assertOptionPresent in Countries 8
Same name and namespace in other branches
- 7.2 tests/countries.test \CountriesBaseSetupTest::assertOptionPresent()
1 call to CountriesBaseSetupTest::assertOptionPresent()
File
- tests/
countries.test, line 44 - Tests for countries.module.
Class
- CountriesBaseSetupTest
- Test the node_load_multiple() function.
Code
function assertOptionPresent($id, $option, $message = NULL) {
$elements = $this
->xpath("//select[@id=:id]//option[@value=:option]", array(
':id' => $id,
':option' => $option,
));
return $this
->assertTrue(isset($elements[0]), $message ? $message : t('Option @option for field @id is present.', array(
'@option' => $option,
'@id' => $id,
)), t('Browser'));
}