From 1ee53258c4076953dc512e78db00adbd7e5b21cd Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Fri, 14 Feb 2014 09:59:38 +0100 Subject: [PATCH] Improved test --- src/DeepCopy/DeepCopy.php | 3 --- tests/DeepCopyTest/DeepCopyTest.php | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/DeepCopy/DeepCopy.php b/src/DeepCopy/DeepCopy.php index b7d54f6..920f3d9 100755 --- a/src/DeepCopy/DeepCopy.php +++ b/src/DeepCopy/DeepCopy.php @@ -3,10 +3,7 @@ namespace DeepCopy; use DeepCopy\Filter\Filter; -use DeepCopy\Filter\SetNullFilter; use DeepCopy\Matcher\Matcher; -use DeepCopy\Matcher\PropertyMatcher; -use ReflectionClass; use ReflectionProperty; /** diff --git a/tests/DeepCopyTest/DeepCopyTest.php b/tests/DeepCopyTest/DeepCopyTest.php index e84c431..e21ed8b 100755 --- a/tests/DeepCopyTest/DeepCopyTest.php +++ b/tests/DeepCopyTest/DeepCopyTest.php @@ -81,6 +81,9 @@ public function testCycleCopy2() $this->assertSame($a2, $a2->property->property); } + /** + * Dynamic properties should be cloned + */ public function testDynamicProperties() { $a = new \stdClass(); @@ -88,6 +91,7 @@ public function testDynamicProperties() $deepCopy = new DeepCopy(); $a2 = $deepCopy->copy($a); + $this->assertNotSame($a->b, $a2->b); $this->assertDeepCopyOf($a, $a2); }