/** * @param \AmazonS3 $service */ function it_is_verbose_and_throws_exceptions_when_fetch_keys($service) { $service->set_region(Argument::any())->shouldBeCalled(); $service->if_bucket_exists('bucketName')->willReturn(true); $service->get_object_list('bucketName')->willThrow(new \RuntimeException('keys')); $this->shouldThrow(new \RuntimeException('keys'))->duringKeys(); }
/** * @param \AmazonS3 $service */ function it_should_not_mask_exception_when_get_keys($service) { $service->if_bucket_exists('bucketName')->willReturn(true); $service->get_object_list('bucketName')->willThrow(new \RuntimeException('keys')); $this->shouldThrow(new \RuntimeException('keys'))->duringKeys(); }