Changeset 27752
- Timestamp:
- 02/08/10 20:21:22 (1 month ago)
- Files:
-
- branches/1.3/lib/escaper/sfOutputEscaperArrayDecorator.class.php (modified) (2 diffs)
- branches/1.3/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php (modified) (2 diffs)
- branches/1.4/lib/escaper/sfOutputEscaperArrayDecorator.class.php (modified) (2 diffs)
- branches/1.4/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.3/lib/escaper/sfOutputEscaperArrayDecorator.class.php
r9158 r27752 26 26 */ 27 27 private $count; 28 29 /** 30 * Constructor. 31 * 32 * @see sfOutputEscaper 33 */ 34 public function __construct($escapingMethod, $value) 35 { 36 parent::__construct($escapingMethod, $value); 37 38 $this->count = count($this->value); 39 } 28 40 29 41 /** … … 67 79 next($this->value); 68 80 69 $this->count --;81 $this->count--; 70 82 } 71 83 branches/1.3/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php
r19531 r27752 25 25 sfConfig::set('sf_charset', 'UTF-8'); 26 26 27 $t = new lime_test(1 0);27 $t = new lime_test(11); 28 28 29 29 $a = array('<strong>escaped!</strong>', 1, null, array(2, '<strong>escaped!</strong>')); … … 84 84 } 85 85 } 86 87 // ->valid() 88 $t->diag('->valid()'); 89 90 $escaped = sfOutputEscaper::escape('esc_entities', array(1, 2, 3)); 91 $t->is($escaped->valid(), true, '->valid() returns true if called before iteration'); branches/1.4/lib/escaper/sfOutputEscaperArrayDecorator.class.php
r9158 r27752 26 26 */ 27 27 private $count; 28 29 /** 30 * Constructor. 31 * 32 * @see sfOutputEscaper 33 */ 34 public function __construct($escapingMethod, $value) 35 { 36 parent::__construct($escapingMethod, $value); 37 38 $this->count = count($this->value); 39 } 28 40 29 41 /** … … 67 79 next($this->value); 68 80 69 $this->count --;81 $this->count--; 70 82 } 71 83 branches/1.4/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php
r19531 r27752 25 25 sfConfig::set('sf_charset', 'UTF-8'); 26 26 27 $t = new lime_test(1 0);27 $t = new lime_test(11); 28 28 29 29 $a = array('<strong>escaped!</strong>', 1, null, array(2, '<strong>escaped!</strong>')); … … 84 84 } 85 85 } 86 87 // ->valid() 88 $t->diag('->valid()'); 89 90 $escaped = sfOutputEscaper::escape('esc_entities', array(1, 2, 3)); 91 $t->is($escaped->valid(), true, '->valid() returns true if called before iteration');

