/** * @see Copyable::getCopy * * @return Snak */ public function getCopy() { $value = $this->dataValue !== null ? $this->dataValue->getCopy() : null; return new self($this->type, $this->propertyId, $value); }
/** * @dataProvider instanceProvider * @param DataValue $value * @param array $arguments */ public function testGetCopy(DataValue $value, array $arguments) { $copy = $value->getCopy(); $this->assertInstanceOf('\\DataValues\\DataValue', $copy); $this->assertTrue($value->equals($copy)); }