Permalink
Browse files

Merge branch 'hotfix/2391' into develop

Forward port #2391
  • Loading branch information...
2 parents fe1bcc6 + 34e8359 commit 8d6b054424f25303885094608a8c26a28c9f7a56 @weierophinney weierophinney committed Sep 20, 2012
Showing with 20 additions and 0 deletions.
  1. +10 −0 library/Zend/Filter/FilterChain.php
  2. +10 −0 tests/ZendTest/Filter/FilterChainTest.php
View
10 library/Zend/Filter/FilterChain.php
@@ -225,4 +225,14 @@ public function filter($value)
return $valueFiltered;
}
+
+ /**
+ * Clone filters
+ *
+ * @return void
+ */
+ public function __clone()
+ {
+ $this->filters = clone $this->filters;
+ }
}
View
10 tests/ZendTest/Filter/FilterChainTest.php
@@ -158,6 +158,16 @@ public function testCanAttachMultipleFiltersOfTheSameTypeAsDiscreteInstances()
$this->assertEquals('Tu et PARTY', $chain->filter('Tu et Foo'));
}
+
+ public function testClone()
+ {
+ $chain = new FilterChain();
+ $clone = clone $chain;
+
+ $chain->attachByName('strip_tags');
+
+ $this->assertCount(0, $clone);
+ }
}

0 comments on commit 8d6b054

Please sign in to comment.