public function testRegisterAdditionalDescriptionDeserializer()
 {
     $descriptionDeserializer = $this->getMockBuilder('\\SMW\\Deserializers\\DVDescriptionDeserializer\\DescriptionDeserializer')->disableOriginalConstructor()->getMockForAbstractClass();
     $descriptionDeserializer->expects($this->once())->method('isDeserializerFor')->will($this->returnValue(true));
     $dataValue = $this->getMockBuilder('\\SMWDataValue')->disableOriginalConstructor()->getMockForAbstractClass();
     $instance = new DVDescriptionDeserializerFactory();
     $instance->registerDescriptionDeserializer($descriptionDeserializer);
     $this->assertInstanceOf('\\SMW\\Deserializers\\DVDescriptionDeserializer\\DescriptionDeserializer', $instance->getDescriptionDeserializerFor($dataValue));
 }
 /**
  * @see DataValueDescriptionDeserializer::deserialize
  *
  * @note Descriptions of values need to know their property to be able to
  * create a parsable wikitext version of a query condition again. Thus it
  * might be necessary to call setProperty() before using this method.
  *
  * @param string $value
  *
  * @return Description
  * @throws InvalidArgumentException
  */
 public function getQueryDescription($value)
 {
     $dvDescriptionDeserializerFactory = DVDescriptionDeserializerFactory::getInstance()->getDescriptionDeserializerFor($this);
     $description = $dvDescriptionDeserializerFactory->deserialize($value);
     foreach ($dvDescriptionDeserializerFactory->getErrors() as $error) {
         $this->addError($error);
     }
     return $description;
 }