Exemplo n.º 1
0
 /**
  * @param \AmazonS3 $service
  */
 function it_is_verbose_and_throws_exceptions_when_read($service)
 {
     $service->if_bucket_exists('bucketName')->shouldBeCalled()->willReturn(true);
     $service->get_object('bucketName', 'filename', array())->willThrow(new \RuntimeException('read'));
     $service->set_region(Argument::any())->shouldBeCalled();
     $this->shouldThrow(new \RuntimeException('read'))->duringRead('filename');
 }
Exemplo n.º 2
0
 /**
  * @param \AmazonS3 $service
  */
 function it_should_not_mask_exception_when_read($service)
 {
     $service->if_bucket_exists('bucketName')->shouldBeCalled()->willReturn(true);
     $service->get_object('bucketName', 'filename', array())->willThrow(new \RuntimeException('read'));
     $this->shouldThrow(new \RuntimeException('read'))->duringRead('filename');
 }