X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Fconfig%2FTests%2FDefinition%2FBuilder%2FExprBuilderTest.php;fp=vendor%2Fsymfony%2Fconfig%2FTests%2FDefinition%2FBuilder%2FExprBuilderTest.php;h=feea16f9c397bbd8c3aa4c2ed18875a2956d3e7a;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=1b90ebfeb82bcace7bc37af959d3dfaf57e1e75c;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php b/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php index 1b90ebfeb..feea16f9c 100644 --- a/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php +++ b/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php @@ -76,6 +76,21 @@ class ExprBuilderTest extends TestCase $this->assertFinalizedValueIs('value', $test); } + public function testIfEmptyExpression() + { + $test = $this->getTestBuilder() + ->ifEmpty() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test, array('key' => array())); + + $test = $this->getTestBuilder() + ->ifEmpty() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('value', $test); + } + public function testIfArrayExpression() { $test = $this->getTestBuilder()