Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83eb6a5

Browse files
committed
Add YAML Loader test
1 parent 260a537 commit 83eb6a5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
autowire_star:
3+
class: Foo
4+
autowire: '*'
5+
6+
autowire_array:
7+
class: Foo
8+
autowire: ['setFoo', 'bar']

src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,10 @@ public function testAutowire()
323323
$loader->load('services23.yml');
324324

325325
$this->assertTrue($container->getDefinition('bar_service')->isAutowired());
326+
327+
$loader->load('services27.yml');
328+
$this->assertSame('*', $container->getDefinition('autowire_star')->getAutowired());
329+
$this->assertEquals(array('setFoo', 'bar'), $container->getDefinition('autowire_array')->getAutowired());
326330
}
327331

328332
/**

0 commit comments

Comments
 (0)