Exemplo n.º 1
0
 public function testPoiCRUD()
 {
     $address = Address::registerAddress('Grundstrasse 12', '6431', 'Schwyz', 'Schweiz', 'Spital Schwyz', 47.17546, 8.517752, 'Spital');
     $this->init->addressRepo->store($address);
     $poiKeyword1 = POIKeyword::registerPOIKeyword('Tet1234');
     $poiKeyword2 = POIKeyword::registerPOIKeyword('Test2345');
     $poiKeyword3 = POIKeyword::registerPOIKeyword('Test3456');
     $this->init->poiKeywordRepo->store($poiKeyword1);
     $this->init->poiKeywordRepo->store($poiKeyword2);
     $this->init->poiKeywordRepo->store($poiKeyword3);
     $poi = POI::registerPoi('Krankenhaus', $address, 'Therapie', '041 818 21 21');
     $poi->assignKeyword($poiKeyword1);
     $poi->assignKeyword($poiKeyword2);
     $poi->assignKeyword($poiKeyword3);
     $this->init->poiRepo->store($poi);
     $this->init->em->flush();
     $poiFind = $this->init->poiRepo->find($poi->getId());
     $this->assertEquals($poi, $poiFind);
     $poi->updatePOIData('Altersheim Wohnwohl', null, 'Pflege', '041 818 31 31', 'Gutes Heim');
     $this->init->poiRepo->store($poi);
     $this->init->em->flush();
     $poiFind = $this->init->poiRepo->find($poi->getId());
     $this->assertEquals($poi, $poiFind);
     $this->poiRemove($poi);
 }
Exemplo n.º 2
0
 /**
  * @param PoiKeywordRegisterDTO $dto
  * @return POIKeyword
  */
 public function registerDTOtoNewPoiKeyword(PoiKeywordRegisterDTO $dto)
 {
     $poiKeyword = POIKeyword::registerPOIKeyword($dto->name, $dto->memo);
     return $poiKeyword;
 }