"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

ExprBuilderTest.php  (phplist-3.4.5.tgz):ExprBuilderTest.php  (phplist-3.4.6.tgz)
skipping to change at line 167 skipping to change at line 167
} }
public function castToArrayValues() public function castToArrayValues()
{ {
yield ['value', ['value']]; yield ['value', ['value']];
yield [-3.14, [-3.14]]; yield [-3.14, [-3.14]];
yield [null, [null]]; yield [null, [null]];
yield [['value'], ['value']]; yield [['value'], ['value']];
} }
/**
* @expectedException \Symfony\Component\Config\Definition\Exception\Invalid
ConfigurationException
*/
public function testThenInvalid() public function testThenInvalid()
{ {
$this->expectException('Symfony\Component\Config\Definition\Exception\In validConfigurationException');
$test = $this->getTestBuilder() $test = $this->getTestBuilder()
->ifString() ->ifString()
->thenInvalid('Invalid value') ->thenInvalid('Invalid value')
->end(); ->end();
$this->finalizeTestBuilder($test); $this->finalizeTestBuilder($test);
} }
public function testThenUnsetExpression() public function testThenUnsetExpression()
{ {
$test = $this->getTestBuilder() $test = $this->getTestBuilder()
->ifString() ->ifString()
->thenUnset() ->thenUnset()
->end(); ->end();
$this->assertEquals([], $this->finalizeTestBuilder($test)); $this->assertEquals([], $this->finalizeTestBuilder($test));
} }
/**
* @expectedException \RuntimeException
* @expectedExceptionMessage You must specify an if part.
*/
public function testEndIfPartNotSpecified() public function testEndIfPartNotSpecified()
{ {
$this->expectException('RuntimeException');
$this->expectExceptionMessage('You must specify an if part.');
$this->getTestBuilder()->end(); $this->getTestBuilder()->end();
} }
/**
* @expectedException \RuntimeException
* @expectedExceptionMessage You must specify a then part.
*/
public function testEndThenPartNotSpecified() public function testEndThenPartNotSpecified()
{ {
$this->expectException('RuntimeException');
$this->expectExceptionMessage('You must specify a then part.');
$builder = $this->getTestBuilder(); $builder = $this->getTestBuilder();
$builder->ifPart = 'test'; $builder->ifPart = 'test';
$builder->end(); $builder->end();
} }
/** /**
* Create a test treebuilder with a variable node, and init the validation. * Create a test treebuilder with a variable node, and init the validation.
* *
* @return TreeBuilder * @return TreeBuilder
*/ */
 End of changes. 6 change blocks. 
12 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)