function test_row(ValidationTest $test, $indentation, TableCreator $table_creator)
{
    $test->with('test', 'requirement', 'children');
    $ret = "";
    $ret .= $table_creator->row(array($table_creator->child_indentation($indentation), $test->public_id(), $test->test->description, $test->requirement == null ? '' : $test->requirement->public_id(), 'success'));
    $nested = $test->children;
    foreach ($nested as $c) {
        $ret .= test_row($c, $indentation + 1, $table_creator);
    }
    return $ret;
}
예제 #2
0
function test_row(ValidationTest $test, TableCreator $table_creator)
{
    $test->with('children');
    if (!isset($test->children) || count($test->children) == 0) {
        return "";
    }
    $str = "\nAll'utente è richiesto di:\n";
    $str .= $table_creator->begin_list();
    foreach ($test->children as $child) {
        $child->with('test');
        $id = $child->public_id();
        $str .= $table_creator->list_item($table_creator->anchor($id, $child->test->description . " ({$id})"));
        $str .= test_row($child, $table_creator);
    }
    $str .= $table_creator->end_list();
    return $str;
}