You are here

protected function oa_coreBaseWebTest::assertOptionExists in Open Atrium Core 7.2

File

tests/oa_coreBase.test, line 68
Provides a base unit test class.

Class

oa_coreBaseWebTest
Base class for testing openatrium web interaction.

Code

protected function assertOptionExists($id, $option, $message = '') {
  $elements = $this
    ->xpath('//select[@id=:id]//option[@value=:option]', array(
    ':id' => $id,
    ':option' => $option,
  ));
  return $this
    ->assertTrue(!empty($elements[0]), $message ? $message : t('Option @option for field @id is selected.', array(
    '@option' => $option,
    '@id' => $id,
  )), t('Browser'));
}