public function copy() { return clone $this; }
public function testCopy() { $str = 'prototype'; $object1 = new ConcretePrototype($str); $this->assertEquals($str, $object1->getName()); $object2 = $object1->copy(); $this->assertEquals($str, $object2->getName()); }