Development

Changeset 2465

You must first sign up to be able to contribute.

Changeset 2465

Show
Ignore:
Timestamp:
10/20/06 14:19:29 (2 years ago)
Author:
fabien
Message:

fixed unit test for windows

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/unit/util/sfToolkitTest.php

    r2287 r2465  
    8989 
    9090// ::stripComments() 
    91 $t->diag('::isPathAbsolute()'); 
     91$t->diag('::stripComments()'); 
    9292 
    9393$php = <<<EOF 
     
    104104EOF; 
    105105 
    106 $stripped_php = <<<EOF 
    107 <?php 
     106$stripped_php = '<?php $i = 1; '; 
    108107 
    109  
    110  
    111 \$i = 1;  
    112 EOF; 
    113  
    114 $t->is(sfToolkit::stripComments($php), $stripped_php, '::stripComments() strip all comments from a php string'); 
     108$t->is(preg_replace('/\s*(\r?\n)+/', ' ', sfToolkit::stripComments($php)), $stripped_php, '::stripComments() strip all comments from a php string'); 
    115109sfConfig::set('sf_strip_comments', false); 
    116110$t->is(sfToolkit::stripComments($php), $php, '::stripComments() do nothing if "sf_strip_comments" is false');