Changeset 2465
- Timestamp:
- 10/20/06 14:19:29 (2 years ago)
- Files:
-
- trunk/test/unit/util/sfToolkitTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/test/unit/util/sfToolkitTest.php
r2287 r2465 89 89 90 90 // ::stripComments() 91 $t->diag(':: isPathAbsolute()');91 $t->diag('::stripComments()'); 92 92 93 93 $php = <<<EOF … … 104 104 EOF; 105 105 106 $stripped_php = <<<EOF 107 <?php 106 $stripped_php = '<?php $i = 1; '; 108 107 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'); 115 109 sfConfig::set('sf_strip_comments', false); 116 110 $t->is(sfToolkit::stripComments($php), $php, '::stripComments() do nothing if "sf_strip_comments" is false');