Development

Changeset 20978

You must first sign up to be able to contribute.

Changeset 20978

Show
Ignore:
Timestamp:
08/09/09 23:02:47 (5 years ago)
Author:
bschussek
Message:

Fixed: base dir is truncated correctly in test suite

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/lime/branches/2.0-experimental/lib/output/LimeOutputConsoleSummary.php

    r20975 r20978  
    1414  protected 
    1515    $printer = null, 
    16     $baseDir = null
     16    $options = array()
    1717    $startTime = 0, 
    1818    $file = null, 
     
    2727    $warnings = 0; 
    2828 
    29   public function __construct(LimePrinter $printer, $baseDir = null
     29  public function __construct(LimePrinter $printer, array $options = array()
    3030  { 
    3131    $this->printer = $printer; 
    32     $this->baseDir = $baseDir; 
    3332    $this->startTime = time(); 
     33    $this->options = array_merge(array( 
     34      'base_dir'  => null, 
     35    ), $options); 
    3436  } 
    3537 
     
    182184  protected function getTruncatedFile() 
    183185  { 
    184     if (!is_null($this->baseDir)) 
     186    if (!is_null($this->options)) 
    185187    { 
    186       return str_replace($this->baseDir, '', $this->file); 
     188      return str_replace($this->options['base_dir'], '', $this->file); 
    187189    } 
    188190    else 
     
    190192      return $this->file; 
    191193    } 
    192  
    193194  } 
    194195} 
  • tools/lime/branches/2.0-experimental/test/unit/output/LimeOutputConsoleSummaryTest.php

    r20965 r20978  
    310310 
    311311  // fixtures 
    312   $output = new LimeOutputConsoleSummary($printer, '/test'); 
     312  $output = new LimeOutputConsoleSummary($printer, array('base_dir' => '/test')); 
    313313  $printer->reset(); 
    314314  $printer->printText(str_pad('/script', 73, '.'));