Development

Changeset 19812

You must first sign up to be able to contribute.

Changeset 19812

Show
Ignore:
Timestamp:
07/01/09 23:56:38 (9 months ago)
Author:
Kris.Wallsmith
Message:

[1.3] Added --rebuild-all option to symfony:test that forces a rebuild of all generated fixture class files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.3/lib/task/symfony/sfSymfonyTestTask.class.php

    r19805 r19812  
    2828      new sfCommandOption('only-failed', 'f', sfCommandOption::PARAMETER_NONE, 'Only run tests that failed last time'), 
    2929      new sfCommandOption('xml', null, sfCommandOption::PARAMETER_REQUIRED, 'The file name for the JUnit compatible XML log file'), 
     30      new sfCommandOption('rebuild-all', null, sfCommandOption::PARAMETER_NONE, 'Rebuild all generated fixture files'), 
    3031    )); 
    3132 
     
    7980    $h->base_dir = realpath(dirname(__FILE__).'/../../../test'); 
    8081 
     82    // remove generated files 
     83    if ($options['rebuild-all']) 
     84    { 
     85      $finder = sfFinder::type('dir')->name(array('base', 'om', 'map')); 
     86      foreach ($finder->in(glob($h->base_dir.'/../lib/plugins/*/test/functional/fixtures/lib')) as $dir) 
     87      { 
     88        sfToolkit::clearDirectory($dir); 
     89      } 
     90    } 
     91 
    8192    if ($status) 
    8293    { 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.