You are here

function DrupalReporter::getParentWeight in SimpleTest 5

Same name and namespace in other branches
  1. 6 drupal_reporter.php \DrupalReporter::getParentWeight()

Retrieves weight of the currently deepest fieldset

2 calls to DrupalReporter::getParentWeight()
DrupalReporter::paintGroupEnd in ./drupal_reporter.php
Paints the end of a group test. Will paint the page footer if the stack of tests has unwound.
DrupalReporter::paintGroupStart in ./drupal_reporter.php
Paints the start of a group test. Will also paint the page header and footer if this is the first test. Will stash the size if the first start.

File

./drupal_reporter.php, line 244

Class

DrupalReporter
Minimal drupal displayer. Accumulates output to $_output. Based on HtmlReporter by Marcus Baker

Code

function getParentWeight($form = NULL, $keys = NULL) {
  if (!isset($form)) {
    $form = $this->form;
  }
  if (!isset($keys)) {
    $keys = $this->form_depth;
  }
  if (count($keys) != 0) {
    $value = array_shift($keys);
    return $this
      ->getParentWeight($form[$value], $keys);
  }
  return $form['#weight'];
}