Exemplo n.º 1
0
 /**
  * @param string $entityType
  * @param object $entity
  * @return object
  * @throws \Exception
  */
 public function execute($entityType, $entity)
 {
     $actions = $this->relationActionPool->getActions($entityType, 'create');
     foreach ($actions as $action) {
         $entity = $action->execute($entityType, $entity);
     }
     return $entity;
 }
Exemplo n.º 2
0
 public function testGetActions()
 {
     $this->objectManagerMock->expects($this->once())->method('get')->with('Test_Class')->willReturn(new \stdClass());
     $this->assertNotEmpty($this->model->getActions('Entity_Test', 'Test_Read'));
 }