Skip to content

Commit

Permalink
Merge pull request #49 from acrobat/usability-fixes
Browse files Browse the repository at this point in the history
Usability fixes
  • Loading branch information
acrobat authored Jul 10, 2017
2 parents dec3a0f + 25463c3 commit 24def49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function getConfigTreeBuilder()
->addDefaultsIfNotSet()
->children()
->scalarNode('connection')->defaultValue('default')->end()
->scalarNode('directory')->defaultNull()->end()
->scalarNode('directory')->defaultValue('%kernel.cache_dir%/bernard')->end()
->scalarNode('phpamqp_service')->defaultValue('old_sound_rabbit_mq.connection.default')->end()
->scalarNode('phpamqp_exchange')->defaultNull()->end()
->arrayNode('phpamqp_default_message_parameters')
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ service definitions.
``` yaml
my_receiver:
class: Acme\Receiver
# public: true # Make sure the service is public
tags:
- { name: bernard.receiver, message: SendNewsletter }
- { name: bernard.receiver, message: ImportUsers }
Expand Down
11 changes: 1 addition & 10 deletions Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testDefaults()
$this->assertEquals([
'prefetch' => null,
'connection' => 'default',
'directory' => null,
'directory' => '%kernel.cache_dir%/bernard',
'phpamqp_service' => 'old_sound_rabbit_mq.connection.default',
'phpamqp_exchange' => null,
'phpamqp_default_message_parameters' => [],
Expand Down Expand Up @@ -66,15 +66,6 @@ public function testPhpAmqpDriverRequiresExchangeOptionToBeSet()
$this->processConfig(['driver' => 'phpamqp']);
}

/**
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
* @expectedExceptionMessage The "directory" option must be defined when using the "file" driver.
*/
public function testFileDriverRequiresDirectoryOptionToBeSet()
{
$this->processConfig(['driver' => 'file']);
}

/**
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
* @expectedExceptionMessage The "ironmq_service" option must be defined when using the "ironmq" driver.
Expand Down

0 comments on commit 24def49

Please sign in to comment.