Development

Changeset 19578

You must first sign up to be able to contribute.

Changeset 19578

Show
Ignore:
Timestamp:
06/26/09 09:03:53 (8 months ago)
Author:
fabien
Message:

[event_dispatcher] made prove.php output prettier and more robust

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • components/event_dispatcher/trunk/test/prove.php

    r19553 r19578  
    1515  protected function get_relative_file($file) 
    1616  { 
    17     $file = str_replace(DIRECTORY_SEPARATOR, '/', str_replace(array( 
     17    return str_replace(DIRECTORY_SEPARATOR, '/', str_replace(array( 
    1818      realpath($this->base_dir).DIRECTORY_SEPARATOR, 
    19       realpath($this->base_dir.'/../lib/plugins').DIRECTORY_SEPARATOR, 
    2019      $this->extension, 
    2120    ), '', $file)); 
    22  
    23     return preg_replace('#^(.*?)Plugin/test/(unit|functional)/#', '[$1] $2/', $file); 
    2421  } 
    2522} 
    2623 
    2724$h = new lime_symfony(new lime_output(isset($argv) && in_array('--color', $argv))); 
    28 $h->base_dir = realpath(dirname(__FILE__).'/..'); 
     25$h->base_dir = realpath(dirname(__FILE__)); 
    2926 
    30 foreach (new DirectoryIterator(dirname(__FILE__)) as $file) 
     27foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__)), RecursiveIteratorIterator::LEAVES_ONLY) as $file) 
    3128{ 
    32   if (false !== strpos($file, 'Test.php')) 
     29  if (preg_match('/Test\.php$/', $file)) 
    3330  { 
    3431    $h->register($file->getRealPath()); 

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.