function component_row(Package $package, $indentation, TableCreator $table_creator)
{
    $ret = $table_creator->row(array($package->full_name(), $package->afferente(), $package->efferente(), round($package->instability(), 2)));
    $nested = $package->with('packages')->packages;
    foreach ($nested as $nuc) {
        $ret .= component_row($nuc, $indentation + 1, $table_creator);
    }
    return $ret;
}
function component_row(Package $package, $indentation, TableCreator $table_creator)
{
    $package->with('integration');
    $ret = $table_creator->row(array($package->full_name(), $package->integration == null ? 'Architettura del sistema' : $package->integration->public_id()));
    $nested = $package->with('packages')->packages;
    foreach ($nested as $nuc) {
        $ret .= component_row($nuc, $indentation + 1, $table_creator);
    }
    return $ret;
}
Пример #3
0
function test_row(TUnitTest $test, TableCreator $table_creator)
{
    $methods = array();
    foreach ($test->methods as $meth) {
        $methods[] = $meth->name . "()";
    }
    if (!empty($methods)) {
        return $table_creator->row(array($test->public_id(), $test->description, implode($methods, "\n\n"), 'Success'));
    }
    return '';
}
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;
}
function req_row(Requirement $req, $indentation, TableCreator $table_creator)
{
    $req->with('validationTest', 'requirements');
    $ret = "";
    $ret .= $table_creator->row(array($table_creator->child_indentation($indentation), $req->public_id(), $req->validationTest == null ? '' : $req->validationTest->public_id()));
    $nested = $req->requirements;
    foreach ($nested as $c) {
        $ret .= req_row($c, $indentation + 1, $table_creator);
    }
    return $ret;
}
function class_row(Class_Prog $class, TableCreator $table_creator)
{
    $ret = "";
    $pkg_name = array();
    foreach ($class->requirements as $c) {
        array_push($pkg_name, $c->public_id());
    }
    array_unique($pkg_name);
    sort($pkg_name);
    $cells = array($table_creator->anchor($class->full_name(), $class->name), implode("\n\n", $pkg_name));
    $ret .= $table_creator->row($cells);
    return $ret;
}
Пример #7
0
function test_row(Requirement $req, $indentation, TableCreator $table_creator, $filter_cat, $filter_pri)
{
    $test = $req->with('system_test')->system_test;
    $ret = "";
    if (isset($req->system_test) && (!is_numeric($filter_cat) || $req->category == $filter_cat) && (!is_numeric($filter_pri) || $req->priority == $filter_pri)) {
        $test->with('test');
        $ret .= $table_creator->row(array($test->public_id(), $test->test->description, 'success', $table_creator->anchor($req->public_id(), $req->public_id())));
    }
    $nested = $req->with('requirements')->requirements;
    foreach ($nested as $nreq) {
        $ret .= test_row($nreq, $indentation + 1, $table_creator, $filter_cat, $filter_pri);
    }
    return $ret;
}
function src_row($uc, $indentation, TableCreator $table_creator)
{
    $req_id = array();
    $uc->with('idUseCase');
    $uc->idUseCase->with('requirements');
    foreach ($uc->idUseCase->requirements as $rq) {
        array_push($req_id, $table_creator->link($rq->public_id(), $rq->public_id()));
    }
    $cells = array($table_creator->child_indentation($indentation), $table_creator->link($uc->public_id(), $uc->public_id()), $table_creator->link($uc->public_id(), $uc->title), implode("\n\n", $req_id));
    $ret = $table_creator->row($cells);
    $nested = UseCase::model()->findAll("t.parent = :parent", array(':parent' => $uc->id_use_case));
    foreach ($nested as $nuc) {
        $ret .= src_row($nuc, $indentation + 1, $table_creator);
    }
    return $ret;
}
function component_row(Package $component, $indentation, TableCreator $table_creator)
{
    $req_id = array();
    $component->with('requirements');
    foreach ($component->requirements as $rq) {
        array_push($req_id, $table_creator->link($rq->public_id(), $rq->public_id()));
    }
    array_unique($req_id);
    $cells = array($table_creator->child_indentation($indentation), $table_creator->link($component->full_name(), $component->full_name("::\\-")), implode("\n\n", $req_id));
    $ret = $table_creator->row($cells);
    $nested = $component->with('packages')->packages;
    foreach ($nested as $nuc) {
        $ret .= component_row($nuc, $indentation + 1, $table_creator);
    }
    return $ret;
}
function requirement_row($req, $indentation, TableCreator $table_creator, $filter_cat, $filter_pri)
{
    $ret = "";
    if ((!is_numeric($filter_cat) || $req->category == $filter_cat) && (!is_numeric($filter_pri) || $req->priority == $filter_pri)) {
        $pkg_name = array();
        foreach ($req->classes as $c) {
            array_push($pkg_name, $table_creator->link($c->full_name(), $c->name));
        }
        array_unique($pkg_name);
        sort($pkg_name);
        $cells = array($table_creator->child_indentation($indentation), $table_creator->link($req->public_id(), $req->public_id()), implode("\n\n", $pkg_name));
        $ret .= $table_creator->row($cells);
    }
    $nested = Requirement::model()->with('classes')->findAll("t.parent=:parent", array(':parent' => $req->id_requirement));
    foreach ($nested as $nreq) {
        $ret .= requirement_row($nreq, $indentation + 1, $table_creator, $filter_cat, $filter_pri);
    }
    return $ret;
}
Пример #11
0
function test_row(Requirement $req, $indentation, TableCreator $table_creator, $filter_cat, $filter_pri)
{
    $test = $req->with('system_test')->system_test;
    $validation = $req->with('validation0')->validation0;
    $ret = "";
    $rv = '';
    if (isset($test)) {
        $rv = $test->public_id();
    } else {
        if (isset($validation)) {
            $rv = $validation->name;
        }
    }
    $ret .= $table_creator->row(array($table_creator->child_indentation($indentation), $req->public_id(), $rv));
    $nested = $req->with('requirements')->requirements;
    foreach ($nested as $nreq) {
        $ret .= test_row($nreq, $indentation + 1, $table_creator, $filter_cat, $filter_pri);
    }
    return $ret;
}
function requirement_row($req, $indentation, TableCreator $table_creator, $filter_cat, $filter_pri)
{
    $ret = "";
    if ((!is_numeric($filter_cat) || $req->category == $filter_cat) && (!is_numeric($filter_pri) || $req->priority == $filter_pri)) {
        $source_desc = array();
        foreach ($req->sources as $rc) {
            $rc->with('useCase', 'externalSource');
            if (isset($rc->useCase)) {
                array_push($source_desc, $table_creator->link($rc->useCase->public_id(), $rc->useCase->public_id()));
            } else {
                array_push($source_desc, $rc->externalSource->description);
            }
        }
        sort($source_desc);
        $cells = array($table_creator->child_indentation($indentation), $table_creator->anchor($req->public_id(), $req->public_id()), $req->category0->name . "\n\n" . $req->priority0->name, $req->description, implode("\n\n", $source_desc));
        $ret .= $table_creator->row($cells);
    }
    $nested = Requirement::model()->with('sources', 'category0', 'priority0')->findAll("t.parent=:parent", array(':parent' => $req->id_requirement));
    foreach ($nested as $nreq) {
        $ret .= requirement_row($nreq, $indentation + 1, $table_creator, $filter_cat, $filter_pri);
    }
    return $ret;
}
Пример #13
0
function test_row(Method $meth, TableCreator $table_creator)
{
    $text = $meth->ttest != null ? $meth->ttest->unitTest->public_id() : '';
    return $table_creator->row(array(Class_Prog::model()->findByPK($meth->id_class)->name . "::" . $meth->name . "()", $text));
}
Пример #14
0
function test_row(UnitTest $test, $indentation, TableCreator $table_creator)
{
    return $table_creator->row(array($table_creator->child_indentation($indentation), $test->public_id(), $test->test->description, $test->method->name . "()", 'success'));
}