/** * @param \AmazonS3 $service */ function it_is_verbose_and_throws_exceptions_when_fetch_mtime($service) { $service->set_region(Argument::any())->shouldBeCalled(); $service->if_bucket_exists('bucketName')->shouldBeCalled()->willReturn(true); $service->get_object_metadata('bucketName', 'filename', Argument::any())->willThrow(new \RuntimeException('mtime')); $this->shouldThrow(new \RuntimeException('mtime'))->duringMtime('filename'); }
/** * @param \AmazonS3 $service */ function it_should_not_mask_exception_when_get_mtime($service) { $service->if_bucket_exists('bucketName')->shouldBeCalled()->willReturn(true); $service->get_object_metadata('bucketName', 'filename', ANY_ARGUMENT)->willThrow(new \RuntimeException('mtime')); $this->shouldThrow(new \RuntimeException('mtime'))->duringMtime('filename'); }