示例#1
0
        $classifier = new Classifier();
        $report = new Report($this->reportTemplate);
        $testSet = Spyc::YAMLLoad($input);
        $testBaseDir = dirname(realpath($input)) . '/';
        foreach ($testSet as $case) {
            $fileName = $testBaseDir . $case['fileName'];
            $classifier->Classify($this->GetFileNames($fileName));
            $report->OpenTestCase($case);
            $classifier->RenderReport($report);
            $report->CloseTestCase();
        }
        $report->Save($this->testReport);
    }
    /***************************************************************************
     ***************************************************************************/
    private function GetFileNames($input)
    {
        $temp = file($input);
        $result = array();
        foreach ($temp as $line) {
            $line = trim($line);
            if ($line != '') {
                $result[] = $line;
            }
        }
        return $result;
    }
}
/******************************************************************************/
Executable::Run('Application');