Copyright 2009-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Jan Schneider (jan@horde.org)
Author: Gunnar Wrobel (wrobel@pardus.de)
Exemplo n.º 1
0
 /**
  * Run the task.
  *
  * @param array &$options Additional options.
  *
  * @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();
     }
 }
Exemplo n.º 2
0
<?php

require_once 'Horde/Test/AllTests.php';
Horde_Test_AllTests::init(__FILE__)->run();