/** * Tests the copy() method. */ public function testCopy() { $document = new \DOMDocument(); $image1 = new Image($document, new MetadataBag()); $image2 = $image1->copy(); $this->assertSame($document, $image1->getDomDocument()); $this->assertNotSame($document, $image2->getDomDocument()); }