Changeset ca1d246


Ignore:
Timestamp:
01/25/12 09:31:50 (4 months ago)
Author:
mrook
Branches:
master
Children:
24fb7cd, 7ef3270
Parents:
13fc574 (diff), 2f5dd85 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Michiel Rook <mrook@…> (01/25/12 09:31:50)
git-committer:
Michiel Rook <mrook@…> (01/25/12 09:31:50)
Message:

Merge pull request #72 from bd808/feature-allow-phpunit-testsuites

Allow PHPUnit_Framework_TestSuite subclasses.

Location:
classes/phing/tasks/ext
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • classes/phing/tasks/ext/phpunit/BatchTest.php

    r61a14c5 r2f5dd85  
    200200        foreach ($this->elements() as $test) 
    201201        { 
    202             $testClass = new ReflectionClass($test); 
     202            $testClass = new $test(); 
     203            if (!($testClass instanceof PHPUnit_Framework_TestSuite)) 
     204            { 
     205              $testClass = new ReflectionClass($test); 
     206            } 
    203207             
    204208            $suite->addTestSuite($testClass); 
     
    215219    { 
    216220        foreach ($this->elements() as $element) { 
    217             $suite->addTestSuite(new ReflectionClass($element)); 
     221            $testClass = new $element(); 
     222            if (!($testClass instanceof PHPUnit_Framework_TestSuite)) 
     223            { 
     224                $testClass = new ReflectionClass($element); 
     225            } 
     226            $suite->addTestSuite($testClass); 
    218227        } 
    219228    } 
  • classes/phing/tasks/ext/coverage/CoverageReportTask.php

    r42f77c6 r0483922  
    239239            $html = $geshi->parse_code(); 
    240240 
    241             $lines = split("<li>|</li>", $html); 
     241            $lines = preg_split("#</?li>#", $html); 
    242242 
    243243            // skip first and last line 
  • classes/phing/tasks/ext/coverage/CoverageReportTransformer.php

    r9afe919 r2eb9b25  
    108108 
    109109        $proc = new XSLTProcessor(); 
    110         if (version_compare(PHP_VERSION,'5.4',"<")) 
     110        if (defined('XSL_SECPREF_WRITE_FILE')) 
    111111        { 
    112             ini_set("xsl.security_prefs", XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY); 
    113         } 
    114         else 
    115         { 
    116             $proc->setSecurityPrefs(XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY); 
     112            if (version_compare(PHP_VERSION,'5.4',"<")) 
     113            { 
     114                ini_set("xsl.security_prefs", XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY); 
     115            } 
     116            else 
     117            { 
     118                $proc->setSecurityPrefs(XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY); 
     119            } 
    117120        } 
    118121         
  • classes/phing/tasks/ext/phk/PhkPackageTask.php

    rf05a911 r0483922  
    225225         */ 
    226226        $output = trim(ob_get_clean()); 
    227         $output = split("\n", $output); 
     227        $output = explode("\n", $output); 
    228228        foreach ($output as $line) { 
    229229            /* 
  • classes/phing/tasks/ext/phpunit/PHPUnitReportTask.php

    r9afe919 r2eb9b25  
    150150 
    151151        $proc = new XSLTProcessor(); 
    152         if (version_compare(PHP_VERSION,'5.4',"<")) 
    153         { 
    154             ini_set("xsl.security_prefs", XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY); 
    155         } 
    156         else 
    157         { 
    158             $proc->setSecurityPrefs(XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY); 
     152        if (defined('XSL_SECPREF_WRITE_FILE')) 
     153        { 
     154            if (version_compare(PHP_VERSION,'5.4',"<")) 
     155            { 
     156                ini_set("xsl.security_prefs", XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY); 
     157            } 
     158            else 
     159            { 
     160                $proc->setSecurityPrefs(XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY); 
     161            } 
    159162        } 
    160163         
Note: See TracChangeset for help on using the changeset viewer.