You are here

function LingotekTestCase::getFirstOption in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.7 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
  2. 7.5 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
  3. 7.6 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()

File

tests/lingotek.setup.test, line 185

Class

LingotekTestCase

Code

function getFirstOption($element) {

  //    debug((string)$element[0]->option[1]);
  $str = '';
  $option = $element[0]->option[1];
  if (!empty($option)) {
    $attributes = $option
      ->attributes();
    $str = (string) $attributes['value'];
  }
  return $str;
}