Development

Changeset 21294

You must first sign up to be able to contribute.

Changeset 21294

Show
Ignore:
Timestamp:
08/21/09 00:15:42 (4 years ago)
Author:
StephenMelrose
Message:

[sfTestsToXUnitPlugin] Created the sfTestsToXUnitTest class to run and parse a test. Created the sfTestsToXUnitTestCase class to store information about a test case. Created the sfTestsToXUnitUtil class to store common tasks.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfTestsToXUnitPlugin/trunk/lib/task/sfTestsToXUnitTask.class.php

    r21265 r21294  
    44 * Task to execute the sfTestsToXUnit testing 
    55 *  
    6  * @package sfTestsToXUnit 
     6 * @package sfTestsToXUnitPlugin 
    77 * @author Stephen Melrose <stephen@sekka.co.uk> 
    88 */ 
     
    3030  protected function execute($arguments = array(), $options = array()) 
    3131  { 
    32     // TODO 
     32    // Get the list of test files 
     33    $finder = sfFinder::type('file')->follow_link()->name('*Test.php'); 
     34    $testFiles = $finder->in(sfConfig::get('sf_test_dir')); 
     35     
     36    // Check to see if any test files were found 
     37    if (!is_array($testFiles) || count($testFiles) < 1) 
     38    { 
     39      throw new Exception('You must register some test files before running them!'); 
     40    } 
     41     
     42    // Create a new output generator 
     43    $outputGenerator = new sfTestsToXUnitOutput($options['path']); 
     44     
     45    // For each test 
     46    /*foreach($testFiles as $testFile) 
     47    { 
     48      // Create a new test 
     49      $test = new sfTestsToXUnitTest($testFile, $options['phpcli']); 
     50      $test->executeTest($outputGenerator); 
     51    }*/ 
     52     
     53    // Test test 
     54    $test = new sfTestsToXUnitTest('D:\Work\MadeByPi\First Direct\Q3\Trunk\Code\Symfony Project\test\unit\DOMDocumentUtilTest.php', $options['phpcli']); 
     55    $test->executeTest($outputGenerator); 
     56     
     57    // Output the tests information in XUnit format 
     58    $outputGenerator->output(); 
    3359  } 
    3460}