예제 #1
0
                    $outdata = $data;
                    $tmp = $key2;
                }
                unset($data);
            }
            if (!array_key_exists($tmp, $hash)) {
                foreach ($outdata as $v) {
                    array_push($this->data["fail"], $v);
                }
                $hash[$tmp] = 1;
            }
            unset($outdata);
        }
    }
    public function getResult()
    {
        $this->calculate($this->fileData1, $this->fileData2);
        $this->data["name"] = "autopack";
        $this->data['success'][0] = array("diff autopack" => "success");
    }
    public function getData()
    {
        return $this->data;
    }
}
$case = new TestStaticPack();
$case->setFile("a.txt", "b.txt");
$case->getResult();
$report = new TestReport();
$report->setData($case->getData());
$report->createTestReport();
예제 #2
0
        } else {
            $data['fail'][$arrPosFa++] = array("file Writabel" => "No Writabel");
        }
        if ($this->checkVersion()) {
            $data['success'][$arrPosSu++] = array("ext-map verison" => "0.0.1");
        } else {
            $data['fail'][$arrPosFa++] = array("ext-map verison" => $this->realVersion);
        }
        if ($this->checkFileMulti()) {
            $data['success'][$arrPosSu++] = array("multi map" => "success");
        } else {
            $data['fail'][$arrPosFa++] = array("multi map" => "fail");
        }
        if ($this->checkFileOne()) {
            $data['success'][$arrPosSu++] = array("one map" => "success");
        } else {
            $data['fail'][$arrPosFa++] = array("one map" => "fail");
        }
        $data['name'] = "auto-plugin";
        $this->data = $data;
    }
    public function getData()
    {
        return $this->data;
    }
}
$myTest = new TestAutoPlugin();
$myTest->startTest();
$myReport = new TestReport();
$myReport->setData($myTest->getData());
$myReport->createTestReport();