Merge pull request #38 from l3l0/fix/configuration-for-acl-amazon

Add configuration for AclAmazonS3.
This commit is contained in:
Leszek Prabucki 2013-02-22 10:52:47 -08:00
commit 79cad5c65a
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"
}