コード例 #1
0
ファイル: AwsS3ResolverTest.php プロジェクト: raphydev/onep
 public function testObjectOptionsPassedToS3ClintOnCreate()
 {
     $binary = new Binary('aContent', 'image/jpeg', 'jpeg');
     $s3 = $this->getS3ClientMock();
     $s3->expects($this->once())->method('putObject')->with(array('CacheControl' => 'max-age=86400', 'ACL' => 'public-read', 'Bucket' => 'images.example.com', 'Key' => 'filter/images/foobar.jpg', 'Body' => 'aContent', 'ContentType' => 'image/jpeg'));
     $resolver = new AwsS3Resolver($s3, 'images.example.com');
     $resolver->setPutOption('CacheControl', 'max-age=86400');
     $resolver->store($binary, 'images/foobar.jpg', 'filter');
 }