public function testGetCapabilityNewTypeSettableAttributeKeysReturnsContentOfStaticArray()
 {
     $this->assertSame($this->getStaticAttribute('\\Dkd\\PhpCmis\\Bindings\\Browser\\JSONConstants', 'CAP_NEW_TYPE_SETTABLE_ATTRIBUTES_KEYS'), JSONConstants::getCapabilityNewTypeSettableAttributeKeys());
 }
Exemplo n.º 2
0
 /**
  * Create NewTypeSettableAttributes object and populate given data to it
  *
  * @param string[]|null $data
  * @return NewTypeSettableAttributes|null Returns object or <code>null</code> if given data is empty
  */
 public function convertNewTypeSettableAttributes(array $data = null)
 {
     if (empty($data)) {
         return null;
     }
     $object = new NewTypeSettableAttributes();
     $object->populate($data, array_combine(JSONConstants::getCapabilityNewTypeSettableAttributeKeys(), array_map(function ($key) {
         // add a prefix "canSet" to all keys as this are the property names
         return 'canSet' . ucfirst($key);
     }, JSONConstants::getCapabilityNewTypeSettableAttributeKeys())), true);
     $object->setExtensions($this->convertExtension($data, JSONConstants::getCapabilityNewTypeSettableAttributeKeys()));
     return $object;
 }