function DrupalReporter::writeToLastField in SimpleTest 6
Same name and namespace in other branches
- 5 drupal_reporter.php \DrupalReporter::writeToLastField()
Recursive function that writes attr to the deepest array
3 calls to DrupalReporter::writeToLastField()
- 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.
- DrupalReporter::writeContent in ./
drupal_reporter.php - writes $msg into the deepest fieldset
File
- ./
drupal_reporter.php, line 209
Class
- DrupalReporter
- Minimal drupal displayer. Accumulates output to $_output. Based on HtmlReporter by Marcus Baker
Code
function writeToLastField(&$form, $attr, $keys) {
while (count($keys) != 0) {
$value = array_shift($keys);
if (isset($form[$value])) {
if (count($keys) == 0) {
$form[$value] += $attr;
}
else {
$this
->writeToLastField($form[$value], $attr, $keys);
}
$keys = array();
}
else {
$form[$value] = $attr;
}
}
}