X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fconfig%2FTests%2FDefinition%2FBuilder%2FExprBuilderTest.php;h=99a10413768b484246394a1e16db2f1d0ef60be2;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=feea16f9c397bbd8c3aa4c2ed18875a2956d3e7a;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php b/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php index feea16f9c..99a104137 100644 --- a/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php +++ b/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php @@ -145,6 +145,25 @@ class ExprBuilderTest extends TestCase $this->assertFinalizedValueIs(array(), $test); } + /** + * @dataProvider castToArrayValues + */ + public function testcastToArrayExpression($configValue, $expectedValue) + { + $test = $this->getTestBuilder() + ->castToArray() + ->end(); + $this->assertFinalizedValueIs($expectedValue, $test, array('key' => $configValue)); + } + + public function castToArrayValues() + { + yield array('value', array('value')); + yield array(-3.14, array(-3.14)); + yield array(null, array(null)); + yield array(array('value'), array('value')); + } + /** * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException */