public function testGetSetWorkflowDefinition()
 {
     $this->assertNull($this->workflowDefinitionEntity->getWorkflowDefinition());
     $value = new WorkflowDefinition();
     $value->setName('test_workflow');
     $this->workflowDefinitionEntity->setWorkflowDefinition($value);
     $this->assertEquals($value, $this->workflowDefinitionEntity->getWorkflowDefinition());
 }
 /**
  * @param array $managedEntityClasses
  * @return WorkflowDefinitionEntity[]
  */
 protected function buildDefinitionEntities(array $managedEntityClasses)
 {
     $definitionEntities = array();
     foreach ($managedEntityClasses as $entityClass) {
         $definitionEntity = new WorkflowDefinitionEntity();
         $definitionEntity->setClassName($entityClass);
         $definitionEntities[] = $definitionEntity;
     }
     return $definitionEntities;
 }
 public function testSetWorkflowDefinitionEntities()
 {
     $firstEntity = new WorkflowDefinitionEntity();
     $firstEntity->setClassName('FirstClass');
     $secondEntity = new WorkflowDefinitionEntity();
     $secondEntity->setClassName('SecondClass');
     $secondEntitySameClass = new WorkflowDefinitionEntity();
     $secondEntitySameClass->setClassName('SecondClass');
     $thirdEntity = new WorkflowDefinitionEntity();
     $thirdEntity->setClassName('ThirdClass');
     $newDefinition = new WorkflowDefinition();
     $newDefinition->setWorkflowDefinitionEntities(array($firstEntity, $secondEntity));
     $this->assertEquals(array($firstEntity, $secondEntity), array_values($newDefinition->getWorkflowDefinitionEntities()->toArray()));
     $newDefinition->setWorkflowDefinitionEntities(array($secondEntitySameClass, $thirdEntity));
     $this->assertEquals(array($secondEntity, $thirdEntity), array_values($newDefinition->getWorkflowDefinitionEntities()->toArray()));
 }