Asserts that a select option in the current page does not exist.
@todo move to simpletest drupal_web_test_case.php.
$id: Id of select field to assert.
$option: Option to assert.
$message: Message to display.
TRUE on pass, FALSE on fail.
protected function assertNoOption($id, $option, $message = '') {
$selects = $this
->xpath('//select[@id=:id]', array(
':id' => $id,
));
$options = $this
->xpath('//select[@id=:id]//option[@value=:option]', array(
':id' => $id,
':option' => $option,
));
return $this
->assertTrue(isset($selects[0]) && !isset($options[0]), $message ? $message : t('Option @option for field @id does not exist.', array(
'@option' => $option,
'@id' => $id,
)), t('Browser'));
}