Add configuration for AclAmazonS3. Replaces #31

This commit is contained in:
l3l0 2013-02-22 17:29:35 +01:00
parent c260b10a0b
commit 216903aa08
4 changed files with 23 additions and 3 deletions

View File

@ -9,4 +9,4 @@ before_script:
- php composer.phar install --dev
script:
- phpunit --coverage-text
- php bin/phpunit --coverage-text

View File

@ -18,9 +18,14 @@ class AclAwareAmazonS3AdapterFactory implements AdapterFactoryInterface
->setDefinition($id.'.delegate', new DefinitionDecorator('knp_gaufrette.adapter.amazon_s3'))
->addArgument(new Reference($config['amazon_s3_id']))
->addArgument($config['bucket_name'])
->addArgument($config['create'])
;
if (isset($config['options'])) {
$definition->addArgument($config['options']);
} elseif (isset($config['create'])) {
$definition->addArgument(array('create' => $config['create']));
}
$def = $container
->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.acl_aware_amazon_s3'))
->addArgument(new Reference($id.'.delegate'))

View File

@ -34,6 +34,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldAllowForFilesystemAlias()
{
@ -42,6 +43,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldWorkForOtherEnv()
{
@ -54,6 +56,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldAllowAccessToAllPublicServices()
{
@ -70,6 +73,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldAllowAccessToLocalFilesystem()
{
@ -78,6 +82,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldAllowAccessToCacheFilesystem()
{
@ -86,6 +91,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldAllowAccessToFtpFilesystem()
{
@ -94,6 +100,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldAllowToNotConfigureStreamWrapper()
{
@ -102,6 +109,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldConfigureStreamWrapperWithDefaultValues()
{
@ -127,6 +135,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldAllowToDefineProtocolOfStreamWrapper()
{
@ -140,6 +149,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldAllowToDefineWhichFileSystemsShouldBeAddToStreamWrapper()
{
@ -159,6 +169,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/**
* @test
* @functional
*/
public function shouldAllowToDefineFileSystemsWithoutDomain()
{

View File

@ -21,7 +21,8 @@
},
"require-dev": {
"symfony/yaml": "2.*",
"symfony/console": "2.*"
"symfony/console": "2.*",
"phpunit/phpunit": "3.7.*"
},
"autoload": {
"psr-0": {
@ -33,5 +34,8 @@
"dev-master": "0.2.x-dev"
}
},
"config": {
"bin-dir": "bin"
},
"target-dir": "Knp/Bundle/GaufretteBundle"
}