public function testCloneIsDeep() { $r = new puzzle_message_Request('GET', '/test', array('foo' => 'baz'), puzzle_stream_Stream::factory('foo')); $r2 = clone $r; $this->assertNotSame($r->getEmitter(), $r2->getEmitter()); $this->assertEquals('foo', $r2->getBody()); $r->getConfig()->set('test', 123); $this->assertFalse($r2->getConfig()->hasKey('test')); $r->setPath('/abc'); $this->assertEquals('/test', $r2->getPath()); }