| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com) 7 * @license LGPL http://www.gnu.org/copyleft/lesser.html 8 */ 9 require_once(dirname(__FILE__). '/lmbTestTreeNode.class.php'); 10 require_once(dirname(__FILE__). '/lmbTestTreeFilePathNode.class.php'); 11 12 /** 13 * class lmbTestTreeGlobNode. 14 * 15 * @package tests_runner 16 * @version $Id: lmbTestTreeGlobNode.class.php 6023 2007-06-28 14:01:23Z pachanga $ 17 */ 18 class lmbTestTreeGlobNode extends lmbTestTreeNode 19 { 20 protected $paths; 21 22 function __construct($paths) 23 { 24 if(!is_array($paths)) 25 $paths = array($paths); 26 $this->paths = $paths; 27 } 28 29 protected function _loadChildren() 30 { 31 $found = false; 32 foreach($this->paths as $path) 33 { 34 foreach(glob($path) as $item) 35 { 36 $found = true; 37 $this->addChild(new lmbTestTreeFilePathNode($item)); 38 } 39 } 40 41 if(!$found) 42 throw new Exception("No tests were found for path '" . implode(';', $this->paths) . "'!"); 43 } 44 45 function getTestLabel() 46 { 47 return 'All ' . implode(';', $this->paths) . ' tests '; 48 } 49 } 50 51 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Dec 2 03:54:09 2008 | Cross-referenced by PHPXref 0.7 |