public function testSetValueThrowsExceptionIfInvalidValueGiven()
 {
     $this->setExpectedException('\\Dkd\\PhpCmis\\Exception\\CmisInvalidArgumentException', null, 1413440336);
     $this->propertyDecimal->setValue(array(''));
 }
 /**
  * @covers  Dkd\PhpCmis\Converter\JsonConverter::convertProperties
  * @covers  Dkd\PhpCmis\Converter\JsonConverter::getPropertyByPropertyType
  * @covers  Dkd\PhpCmis\Converter\JsonConverter::convertStringValues
  * @covers  Dkd\PhpCmis\Converter\JsonConverter::convertBooleanValues
  * @covers  Dkd\PhpCmis\Converter\JsonConverter::convertIntegerValues
  * @covers  Dkd\PhpCmis\Converter\JsonConverter::convertDecimalValues
  * @return Properties
  */
 public function testConvertPropertiesConvertsArrayToPropertiesObject()
 {
     $properties = new Properties();
     $htmlProperty = new PropertyHtml('HtmlProp', 'dummy value');
     $htmlProperty->setLocalName('HtmlProp');
     $htmlProperty->setQueryName('HtmlProp');
     $htmlProperty->setDisplayName('Sample Html Property');
     $properties->addProperty($htmlProperty);
     $idProperty = new PropertyId('IdProp', 'dummy value');
     $idProperty->setLocalName('IdProp');
     $idProperty->setQueryName('IdProp');
     $idProperty->setDisplayName('Sample Id Property');
     $properties->addProperty($idProperty);
     $dateTimeMultiValueProperty = new PropertyDateTime('DateTimePropMV', array(new \DateTime('@1342160128'), new \DateTime('@1342170128')));
     $dateTimeMultiValueProperty->setLocalName('DateTimePropMV');
     $dateTimeMultiValueProperty->setQueryName('DateTimePropMV');
     $dateTimeMultiValueProperty->setDisplayName('Sample DateTime multi-value Property');
     $properties->addProperty($dateTimeMultiValueProperty);
     $uriProperty = new PropertyUri('UriProp', 'dummy value');
     $uriProperty->setLocalName('UriProp');
     $uriProperty->setQueryName('UriProp');
     $uriProperty->setDisplayName('Sample Uri Property');
     $properties->addProperty($uriProperty);
     $decimalProperty = new PropertyDecimal('DecimalProp', 1.2);
     $decimalProperty->setLocalName('DecimalProp');
     $decimalProperty->setQueryName('DecimalProp');
     $decimalProperty->setDisplayName('Sample Decimal Property');
     $properties->addProperty($decimalProperty);
     $uriMultiValueProperty = new PropertyUri('UriPropMV', array('dummy value', 'dummy value'));
     $uriMultiValueProperty->setLocalName('UriPropMV');
     $uriMultiValueProperty->setQueryName('UriPropMV');
     $uriMultiValueProperty->setDisplayName('Sample Uri multi-value Property');
     $properties->addProperty($uriMultiValueProperty);
     $booleanProperty = new PropertyBoolean('BooleanProp', true);
     $booleanProperty->setLocalName('BooleanProp');
     $booleanProperty->setQueryName('BooleanProp');
     $booleanProperty->setDisplayName('Sample Boolean Property');
     $properties->addProperty($booleanProperty);
     $idMultiValueProperty = new PropertyId('IdPropMV', array('dummy value', 'dummy value'));
     $idMultiValueProperty->setLocalName('IdPropMV');
     $idMultiValueProperty->setQueryName('IdPropMV');
     $idMultiValueProperty->setDisplayName('Sample Id Html multi-value Property');
     $properties->addProperty($idMultiValueProperty);
     $pickListProperty = new PropertyString('PickListProp', 'blue');
     $pickListProperty->setLocalName('PickListProp');
     $pickListProperty->setQueryName('PickListProp');
     $pickListProperty->setDisplayName('Sample Pick List Property');
     $properties->addProperty($pickListProperty);
     $htmlMultiValueProperty = new PropertyHtml('HtmlPropMV', array('dummy value', 'dummy value'));
     $htmlMultiValueProperty->setLocalName('HtmlPropMV');
     $htmlMultiValueProperty->setQueryName('HtmlPropMV');
     $htmlMultiValueProperty->setDisplayName('Sample Html multi-value Property');
     $properties->addProperty($htmlMultiValueProperty);
     $intProperty = new PropertyInteger('IntProp', 12);
     $intProperty->setLocalName('IntProp');
     $intProperty->setQueryName('IntProp');
     $intProperty->setDisplayName('Sample Int Property');
     $properties->addProperty($intProperty);
     $stringProperty = new PropertyString('StringProp', 'My Doc StringProperty 18');
     $stringProperty->setLocalName('StringProp');
     $stringProperty->setQueryName('StringProp');
     $stringProperty->setDisplayName('Sample String Property');
     $properties->addProperty($stringProperty);
     $decimalMultiValueProperty = new PropertyDecimal('DecimalPropMV', array(1.2, 2.3));
     $decimalMultiValueProperty->setLocalName('DecimalPropMV');
     $decimalMultiValueProperty->setQueryName('DecimalPropMV');
     $decimalMultiValueProperty->setDisplayName('Sample Decimal multi-value Property');
     $properties->addProperty($decimalMultiValueProperty);
     $dateTimeProperty = new PropertyDateTime('DateTimeProp', new \DateTime('@1342160128'));
     $dateTimeProperty->setLocalName('DateTimeProp');
     $dateTimeProperty->setQueryName('DateTimeProp');
     $dateTimeProperty->setDisplayName('Sample DateTime Property');
     $properties->addProperty($dateTimeProperty);
     $booleanMultiValueProperty = new PropertyBoolean('BooleanPropMV', array(true, false));
     $booleanMultiValueProperty->setLocalName('BooleanPropMV');
     $booleanMultiValueProperty->setQueryName('BooleanPropMV');
     $booleanMultiValueProperty->setDisplayName('Sample Boolean multi-value Property');
     $properties->addProperty($booleanMultiValueProperty);
     $intMultiValueProperty = new PropertyInteger('IntPropMV', array(1, 2));
     $intMultiValueProperty->setLocalName('IntPropMV');
     $intMultiValueProperty->setQueryName('IntPropMV');
     $intMultiValueProperty->setDisplayName('Sample Int multi-value Property');
     $properties->addProperty($intMultiValueProperty);
     $properties->setExtensions($this->cmisExtensionsDummy);
     $getObjectResponse = $this->getResponseFixtureContentAsArray('Cmis/v1.1/BrowserBinding/getObject-response.log');
     $result = $this->jsonConverter->convertProperties($getObjectResponse[JSONConstants::JSON_OBJECT_PROPERTIES], $getObjectResponse[JSONConstants::JSON_OBJECT_PROPERTIES_EXTENSION]);
     $this->assertEquals($properties, $result);
     return $result;
 }