private function poiRemove(POI $poi) { $id = $poi->getId(); POI::removePoi($poi); $this->init->em->remove($poi); $this->init->em->flush(); $this->assertEquals(null, $this->init->poiRepo->find($id)); }
/** * @param POI $poi * @return POIListDTO */ public function poiToPOIListDTO(POI $poi) { $poiListDTO = new POIListDTO(); $poiListDTO->id = $poi->getId(); $poiListDTO->isActive = $poi->getIsActive(); $poiListDTO->name = $poi->getName(); $poiListDTO->department = $poi->getDepartment(); $poiListDTO->telephone = $poi->getTelephone(); $poiListDTO->street = $poi->getAddress()->getStreet(); $poiListDTO->city = $poi->getAddress()->getCity(); $poiListDTO->keywords = $poi->getKeywordsAsString(); return $poiListDTO; }