You are here

function CountriesBaseSetupTest::assertOptionPresent in Countries 7.2

Same name and namespace in other branches
  1. 8 tests/countries.test \CountriesBaseSetupTest::assertOptionPresent()
1 call to CountriesBaseSetupTest::assertOptionPresent()
CountriesElementUnitTest::testFAPIElement in tests/countries.test

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'));
}