Changeset 5849
- Timestamp:
- 11/04/07 16:52:56 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/view/escaper/sfOutputEscaperObjectDecorator.class.php
r4597 r5849 100 100 if (method_exists($this->value, '__toString')) 101 101 { 102 return $this-> value->__toString();102 return $this->escape($this->escapingMethod, $this->value->__toString()); 103 103 } 104 104 else trunk/test/unit/view/escaper/sfOutputEscaperObjectDecoratorTest.php
r4263 r5849 25 25 sfConfig::set('sf_charset', 'UTF-8'); 26 26 27 $t = new lime_test( 2, new lime_output_color());27 $t = new lime_test(3, new lime_output_color()); 28 28 29 29 class OutputEscaperTest 30 30 { 31 public function __toString() 32 { 33 return $this->getTitle(); 34 } 35 31 36 public function getTitle() 32 37 { … … 47 52 $array = $escaped->getTitles(); 48 53 $t->is($array[2], '<strong>escaped!</strong>', 'The escaped object behaves like the real object'); 54 55 // __toString() 56 $t->diag('__toString()'); 57 58 $t->is($escaped->__toString(), '<strong>escaped!</strong>', 'The escaped object behaves like the real object');