@@ 56-64 (lines=9) @@ | ||
53 | * @expectedException \Exception |
|
54 | * @expectedExceptionMessage Invalid S3 acl value. |
|
55 | */ |
|
56 | public function testAmazonConfigAclInvalid() |
|
57 | { |
|
58 | $this->config = [ |
|
59 | 'local_storage' => ['path' => '', 'url' => ''], |
|
60 | 'amazon_s3' => ['key' => '', 'secret' => '', 'region' => '', 'bucket' => '', 'acl' => 'read'], |
|
61 | ]; |
|
62 | $this->factory = new FileSystemFactory('amazon_s3', $this->config, '/tmp'); |
|
63 | $this->factory->build('amazon_s3'); |
|
64 | } |
|
65 | ||
66 | /** |
|
67 | * Should |
|
@@ 69-79 (lines=11) @@ | ||
66 | /** |
|
67 | * Should |
|
68 | */ |
|
69 | public function testAmazonConfigAclValid() |
|
70 | { |
|
71 | $this->config = [ |
|
72 | 'local_storage' => ['path' => '', 'url' => ''], |
|
73 | 'amazon_s3' => ['key' => '', 'secret' => '', 'region' => '', 'bucket' => '', 'acl' => 'public-read'], |
|
74 | ]; |
|
75 | $this->factory = new FileSystemFactory('amazon_s3', $this->config, '/tmp'); |
|
76 | ||
77 | $s3Adaptor = $this->factory->build('amazon_s3'); |
|
78 | $this->assertInstanceOf('Partnermarketing\FileSystemBundle\Adapter\AmazonS3', $s3Adaptor); |
|
79 | } |
|
80 | ||
81 | public function testDefaultsTempDirCorrectly() |
|
82 | { |