示例#1
0
 /**
  * @expectedException \Oro\Bundle\WorkflowBundle\Exception\UnknownAttributeException
  * @expectedExceptionMessage There is no entity attribute
  */
 public function testEntityAttributeException()
 {
     $attributeManager = new AttributeManager();
     $entityAttributeName = 'test';
     $attributeManager->setEntityAttributeName($entityAttributeName);
     $attributeManager->getEntityAttribute();
 }
示例#2
0
 /**
  * Get attribute names mapped to property paths if any.
  *
  * @return array
  */
 public function getAttributesMapping()
 {
     $mapping = array();
     /** @var Attribute $attribute */
     foreach ($this->attributeManager->getAttributes() as $attribute) {
         if ($attribute->getPropertyPath()) {
             $mapping[$attribute->getName()] = $attribute->getPropertyPath();
         }
     }
     return $mapping;
 }