public function testMergeWithRegistry() { $firstEntity = new \stdClass(); $secondEntity = new \stdClass(); $firstRegistry = new Registry(); $firstRegistry->append($firstEntity); $secondRegistry = new Registry(); $secondRegistry->append($secondEntity); $firstRegistry->merge($secondRegistry); $this->assertSame(array($firstEntity, $secondEntity), $firstRegistry->getArrayCopy()); }