예제 #1
0
 /**
  * @Route("/photos/{photoId}", name="api.photo")
  * @Method("GET")
  * @return JsonResponse
  */
 public function getPhotoAction($photoId)
 {
     $photoRepository = $this->get('freyr.gallery.repository.photo');
     $photosInteractor = new GetPhotoById($photoId, $photoRepository);
     $response = $photosInteractor->execute();
     return new JsonResponse($response);
 }
예제 #2
0
 /**
  * @expectedException \Exception
  */
 public function getNonExistingPhoto()
 {
     $interactor = new GetPhotoById(1, $this->repository);
     $interactor->execute();
 }