Skip to content

Commit 3c4b4c4

Browse files
committed
Merge remote-tracking branch 'origin/2.1' into 2.2
Conflicts: composer.json
2 parents b492800 + 56e6920 commit 3c4b4c4

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function getConfigTreeBuilder()
113113
->end()
114114
->children()
115115
->scalarNode('id')->isRequired()->end()
116-
->scalarNode('factory-method')->defaultNull()->end()
116+
->scalarNode('method')->defaultNull()->end()
117117
->end()
118118
->end()
119119
->scalarNode('connection_string')->end() // socket_handler

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,33 @@ public function testMergingInvalidChannels()
186186
$config = $this->process($configs);
187187
}
188188

189+
public function testWithSwiftMailerHandler()
190+
{
191+
$configs = array(
192+
array(
193+
'handlers' => array(
194+
'swift' => array(
195+
'type' => 'swift_mailer',
196+
'from_email' => '[email protected]',
197+
'to_email' => '[email protected]',
198+
'subject' => 'Subject',
199+
'email_prototype' => array(
200+
'id' => 'monolog.prototype',
201+
'method' => 'getPrototype'
202+
)
203+
)
204+
)
205+
)
206+
);
207+
208+
$config = $this->process($configs);
209+
210+
// Check email_prototype
211+
$this->assertCount(2, $config['handlers']['swift']['email_prototype']);
212+
$this->assertEquals('monolog.prototype', $config['handlers']['swift']['email_prototype']['id']);
213+
$this->assertEquals('getPrototype', $config['handlers']['swift']['email_prototype']['method']);
214+
}
215+
189216
public function testWithType()
190217
{
191218
$configs = array(

0 commit comments

Comments
 (0)