Changeset 151

Show
Ignore:
Timestamp:
05/04/08 20:55:14 (8 months ago)
Author:
iteman
Message:

- Minor changes.

Location:
trunk/src/Stagehand/TestRunner
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/Stagehand/TestRunner/Collector/Common.php

    r141 r151  
    263263 
    264264            if (!is_null($this->_excludePattern) 
    265                 && preg_match($this->_excludePattern, $newClasses[$i]) 
     265                && preg_match("/{$this->_excludePattern}/", $newClasses[$i]) 
    266266                ) { 
    267267                continue; 
     
    269269 
    270270            if (!is_null($this->_includePattern) 
    271                 && !preg_match($this->_includePattern, $newClasses[$i]) 
     271                && !preg_match("/{$this->_includePattern}/", $newClasses[$i]) 
    272272                ) { 
    273273                continue; 
  • trunk/src/Stagehand/TestRunner/Collector/PHPSpec.php

    r120 r151  
    6868    protected $_baseClass = 'PHPSpec_Context'; 
    6969    protected $_suffix = 'Spec'; 
    70     protected $_includePattern = '!(^[Dd]escribe|[Ss]pec$)!'; 
     70    protected $_includePattern = '(^[Dd]escribe|[Ss]pec$)'; 
    7171 
    7272    /**#@-*/ 
  • trunk/src/Stagehand/TestRunner/Collector/PHPUnit.php

    r120 r151  
    6767     */ 
    6868 
    69     protected $_excludePattern = '!^PHPUnit!'; 
     69    protected $_excludePattern = '^PHPUnit'; 
    7070    protected $_baseClass = 'PHPUnit_Framework_TestCase'; 
    7171 
  • trunk/src/Stagehand/TestRunner/Collector/SimpleTest.php

    r120 r151  
    7070     */ 
    7171 
    72     protected $_excludePattern = '!^(UnitTestCase$|PHPUnit)!i'; 
     72    protected $_excludePattern = '^(UnitTestCase$|PHPUnit)'; 
    7373    protected $_baseClass = 'UnitTestCase'; 
    7474 
  • trunk/src/Stagehand/TestRunner/DirectoryScanner.php

    r150 r151  
    7070     */ 
    7171 
    72     private $_excludePatterns = array('!^CVS$!', 
    73                                       '!^.svn!', 
    74                                       '!\.swp$!', 
    75                                       '!~$!', 
    76                                       '!\.bak$!', 
    77                                       '!^#.+#$!' 
     72    private $_excludePatterns = array('^CVS$', 
     73                                      '^.svn', 
     74                                      '\.swp$', 
     75                                      '~$', 
     76                                      '\.bak$', 
     77                                      '^#.+#$' 
    7878                                      ); 
    7979    private $_callback; 
     
    119119 
    120120            foreach ($this->_excludePatterns as $excludePattern) { 
    121                 if (preg_match($excludePattern, $files[$i])) { 
     121                if (preg_match("/$excludePattern/", $files[$i])) { 
    122122                    continue 2; 
    123123                }