Skip to content

Commit

Permalink
Improved test
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Feb 14, 2014
1 parent 6ff74ad commit 1ee5325
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/DeepCopy/DeepCopy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
4 changes: 4 additions & 0 deletions tests/DeepCopyTest/DeepCopyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,17 @@ public function testCycleCopy2()
$this->assertSame($a2, $a2->property->property);
}

/**
* Dynamic properties should be cloned
*/
public function testDynamicProperties()
{
$a = new \stdClass();
$a->b = new \stdClass();

$deepCopy = new DeepCopy();
$a2 = $deepCopy->copy($a);
$this->assertNotSame($a->b, $a2->b);
$this->assertDeepCopyOf($a, $a2);
}

Expand Down

0 comments on commit 1ee5325

Please sign in to comment.