Components_Qc_Task_Unit::run PHP Method

run() public method

Run the task.
public run ( &$options ) : integer
return integer Number of errors.
    public function run(&$options)
    {
        try {
            $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(realpath($this->_config->getPath() . '/test')));
        } catch (Exception $e) {
            return false;
        }
        $result = null;
        foreach ($iterator as $file) {
            if ($file->getFilename() == 'AllTests.php') {
                $result = Horde_Test_AllTests::init(strval($file))->run();
            }
        }
        if ($result) {
            return $result->errorCount() + $result->failureCount();
        }
    }
Components_Qc_Task_Unit