public function XmlFileLoaderTest::testLoadParameters in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/Loader/XmlFileLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\XmlFileLoaderTest::testLoadParameters()
File
- vendor/
symfony/ dependency-injection/ Tests/ Loader/ XmlFileLoaderTest.php, line 86
Class
Namespace
Symfony\Component\DependencyInjection\Tests\LoaderCode
public function testLoadParameters() {
$container = new ContainerBuilder();
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader
->load('services2.xml');
$actual = $container
->getParameterBag()
->all();
$expected = array(
'a string',
'foo' => 'bar',
'values' => array(
0,
'integer' => 4,
100 => null,
'true',
true,
false,
'on',
'off',
'float' => 1.3,
1000.3,
'a string',
array(
'foo',
'bar',
),
),
'mixedcase' => array(
'MixedCaseKey' => 'value',
),
'constant' => PHP_EOL,
);
$this
->assertEquals($expected, $actual, '->load() converts XML values to PHP ones');
}