Exemple #1
0
 function it_returns_gallery_and_images_if_gallery_is_protected_and_password_is_valid(GalleryRepository $galleryRepository, ImageRepository $imageRepository)
 {
     $gallery = $this->getGallery($imageRepository->getWrappedObject(), sha1('password'));
     $galleryRepository->getBySlug('slug')->shouldBeCalled()->willReturn($gallery);
     $imageRepository->getAll()->shouldBeCalled()->willReturn(['all', 'images']);
     $this->execute()->shouldReturn(['gallery' => $gallery, 'images' => ['all', 'images']]);
 }
 function it_returns_gallery_by_slug(GalleryRepository $galleryRepository)
 {
     $galleryRepository->getBySlug('slug')->shouldBeCalled()->willReturn('some gallery');
     $this->execute()->shouldReturn(['gallery' => 'some gallery']);
 }