Ejemplo n.º 1
0
 /**
  * @param string $entityType
  * @param object $entity
  * @return bool
  */
 public function execute($entityType, $entity)
 {
     $hydrator = $this->metadataPool->getHydrator($entityType);
     $entityData = $hydrator->extract($entity);
     return $this->deleteEntityRow->execute($entityType, $entityData);
 }
Ejemplo n.º 2
0
 public function testExecute()
 {
     $data = ['entity_id' => 1];
     $this->connection->expects($this->once())->method('delete')->with('entity_table', ['entity_id = ?' => 1]);
     $this->subject->execute('Test\\Entity\\Type', $data);
 }