Changeset 119
- Timestamp:
- 02/29/08 22:47:35 (11 months ago)
- Files:
-
- 1 modified
-
trunk/src/Stagehand/TestRunner/Common.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Stagehand/TestRunner/Common.php
r118 r119 76 76 */ 77 77 78 private $_targetPath; 79 private $_isRecursive; 78 private $_suite; 80 79 81 80 /**#@-*/ … … 113 112 } 114 113 115 $this->_targetPath = $absoluteTargetPath; 116 $this->_color = $color; 117 $this->_isRecursive = is_dir($absoluteTargetPath) && $isRecursive; 118 } 119 120 // }}} 121 // {{{ run() 122 123 /** 124 * Runs tests in the directory. 125 * 126 * @return stdClass 127 */ 128 public function run() 129 { 130 if ($this->_isRecursive) { 114 if (is_dir($absoluteTargetPath) && $isRecursive) { 131 115 $suite = $this->_createTestSuite(); 132 $directories = $this->_getDirectories($ this->_targetPath);116 $directories = $this->_getDirectories($absoluteTargetPath); 133 117 for ($i = 0, $count = count($directories); $i < $count; ++$i) { 134 118 $this->_buildTestSuite($suite, $directories[$i]); 135 119 } 136 120 } else { 137 $suite = $this->_buildTestSuite($this->_createTestSuite(), $this->_targetPath); 138 } 139 140 return $this->_doRun($suite); 121 $suite = $this->_buildTestSuite($this->_createTestSuite(), $absoluteTargetPath); 122 } 123 124 $this->_suite = $suite; 125 $this->_color = $color; 126 } 127 128 // }}} 129 // {{{ run() 130 131 /** 132 * Runs tests in the directory. 133 * 134 * @return stdClass 135 */ 136 public function run() 137 { 138 return $this->_doRun($this->_suite); 141 139 } 142 140
