/**
  * @since 2.4
  *
  * @param DataValueFormatter $dataValueFormatter
  */
 public function registerDataValueFormatter(DataValueFormatter $dataValueFormatter)
 {
     ValueFormatterRegistry::getInstance()->registerDataValueFormatter($dataValueFormatter);
 }
 /**
  * Returns a DataValueFormatter that was matched and dispatched for the current
  * DV instance.
  *
  * @since 2.4
  *
  * @return DataValueFormatter
  */
 public function getDataValueFormatter()
 {
     return ValueFormatterRegistry::getInstance()->getDataValueFormatterFor($this);
 }
 public function testCanConstruct()
 {
     $dispatchingDescriptionDeserializer = $this->getMockBuilder('\\SMW\\DataValues\\ValueFormatters\\DispatchingDataValueFormatter')->disableOriginalConstructor()->getMock();
     $this->assertInstanceOf('\\SMW\\DataValues\\ValueFormatterRegistry', new ValueFormatterRegistry($dispatchingDescriptionDeserializer));
     $this->assertInstanceOf('\\SMW\\DataValues\\ValueFormatterRegistry', ValueFormatterRegistry::getInstance());
 }