Changeset 100
- Timestamp:
- 12/19/07 11:09:29 (13 months ago)
- Files:
-
- 1 modified
-
trunk/src/Stagehand/TestRunner/Common.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Stagehand/TestRunner/Common.php
r98 r100 231 231 232 232 // }}} 233 // {{{ _exclude()234 235 /**236 * Returns whether the class should be exclude or not.237 *238 * @param string $class239 * @return boolean240 */241 private function _exclude($class)242 {243 if (!is_null($this->_excludePattern) && preg_match($this->_excludePattern, $class)) {244 return true;245 }246 247 return !is_subclass_of($class, $this->_baseClass);248 }249 250 // }}}251 233 // {{{ _collectTestCases() 252 234 … … 294 276 $newClasses = array_values(array_diff(get_declared_classes(), $currentClasses)); 295 277 for ($j = 0, $jCount = count($newClasses); $j < $jCount; ++$j) { 296 if ( $this->_exclude($newClasses[$j])) {278 if (!is_subclass_of($newClasses[$j], $this->_baseClass)) { 297 279 continue; 298 280 } 299 281 300 if (!$this->_include($newClasses[$j])) { 282 if (!is_null($this->_excludePattern) 283 && preg_match($this->_excludePattern, $newClasses[$j]) 284 ) { 285 continue; 286 } 287 288 if (!is_null($this->_includePattern) 289 && !preg_match($this->_includePattern, $newClasses[$j]) 290 ) { 301 291 continue; 302 292 } … … 344 334 345 335 return $directories; 346 }347 348 // }}}349 // {{{ _include()350 351 /**352 * Returns whether the class should be include or not.353 *354 * @param string $class355 * @return boolean356 */357 private function _include($class)358 {359 if (!is_null($this->_includePattern) && preg_match($this->_includePattern, $class)) {360 return true;361 }362 363 return is_subclass_of($class, $this->_baseClass);364 336 } 365 337
