We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ff74ad commit 1ee5325Copy full SHA for 1ee5325
src/DeepCopy/DeepCopy.php
@@ -3,10 +3,7 @@
3
namespace DeepCopy;
4
5
use DeepCopy\Filter\Filter;
6
-use DeepCopy\Filter\SetNullFilter;
7
use DeepCopy\Matcher\Matcher;
8
-use DeepCopy\Matcher\PropertyMatcher;
9
-use ReflectionClass;
10
use ReflectionProperty;
11
12
/**
tests/DeepCopyTest/DeepCopyTest.php
@@ -81,13 +81,17 @@ public function testCycleCopy2()
81
$this->assertSame($a2, $a2->property->property);
82
}
83
84
+ /**
85
+ * Dynamic properties should be cloned
86
+ */
87
public function testDynamicProperties()
88
{
89
$a = new \stdClass();
90
$a->b = new \stdClass();
91
92
$deepCopy = new DeepCopy();
93
$a2 = $deepCopy->copy($a);
94
+ $this->assertNotSame($a->b, $a2->b);
95
$this->assertDeepCopyOf($a, $a2);
96
97
0 commit comments