"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.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).

ChildDefinitionTest.php  (phplist-3.4.5.tgz):ChildDefinitionTest.php  (phplist-3.4.6.tgz)
skipping to change at line 93 skipping to change at line 93
public function testSetArgument() public function testSetArgument()
{ {
$def = new ChildDefinition('foo'); $def = new ChildDefinition('foo');
$this->assertSame([], $def->getArguments()); $this->assertSame([], $def->getArguments());
$this->assertSame($def, $def->replaceArgument(0, 'foo')); $this->assertSame($def, $def->replaceArgument(0, 'foo'));
$this->assertSame(['index_0' => 'foo'], $def->getArguments()); $this->assertSame(['index_0' => 'foo'], $def->getArguments());
} }
/**
* @expectedException \InvalidArgumentException
*/
public function testReplaceArgumentShouldRequireIntegerIndex() public function testReplaceArgumentShouldRequireIntegerIndex()
{ {
$this->expectException('InvalidArgumentException');
$def = new ChildDefinition('foo'); $def = new ChildDefinition('foo');
$def->replaceArgument('0', 'foo'); $def->replaceArgument('0', 'foo');
} }
public function testReplaceArgument() public function testReplaceArgument()
{ {
$def = new ChildDefinition('foo'); $def = new ChildDefinition('foo');
$def->setArguments([0 => 'foo', 1 => 'bar']); $def->setArguments([0 => 'foo', 1 => 'bar']);
skipping to change at line 122 skipping to change at line 120
$this->assertSame('foo', $def->getArgument(0)); $this->assertSame('foo', $def->getArgument(0));
$this->assertSame('baz', $def->getArgument(1)); $this->assertSame('baz', $def->getArgument(1));
$this->assertSame([0 => 'foo', 1 => 'bar', 'index_1' => 'baz'], $def->ge tArguments()); $this->assertSame([0 => 'foo', 1 => 'bar', 'index_1' => 'baz'], $def->ge tArguments());
$this->assertSame($def, $def->replaceArgument('$bar', 'val')); $this->assertSame($def, $def->replaceArgument('$bar', 'val'));
$this->assertSame('val', $def->getArgument('$bar')); $this->assertSame('val', $def->getArgument('$bar'));
$this->assertSame([0 => 'foo', 1 => 'bar', 'index_1' => 'baz', '$bar' => 'val'], $def->getArguments()); $this->assertSame([0 => 'foo', 1 => 'bar', 'index_1' => 'baz', '$bar' => 'val'], $def->getArguments());
} }
/**
* @expectedException \OutOfBoundsException
*/
public function testGetArgumentShouldCheckBounds() public function testGetArgumentShouldCheckBounds()
{ {
$this->expectException('OutOfBoundsException');
$def = new ChildDefinition('foo'); $def = new ChildDefinition('foo');
$def->setArguments([0 => 'foo']); $def->setArguments([0 => 'foo']);
$def->replaceArgument(0, 'foo'); $def->replaceArgument(0, 'foo');
$def->getArgument(1); $def->getArgument(1);
} }
public function testDefinitionDecoratorAliasExistsForBackwardsCompatibility( ) public function testDefinitionDecoratorAliasExistsForBackwardsCompatibility( )
{ {
$this->assertInstanceOf(ChildDefinition::class, new DefinitionDecorator( 'foo')); $this->assertInstanceOf(ChildDefinition::class, new DefinitionDecorator( 'foo'));
} }
/**
* @expectedException \Symfony\Component\DependencyInjection\Exception\BadMe
thodCallException
*/
public function testCannotCallSetAutoconfigured() public function testCannotCallSetAutoconfigured()
{ {
$this->expectException('Symfony\Component\DependencyInjection\Exception\ BadMethodCallException');
$def = new ChildDefinition('foo'); $def = new ChildDefinition('foo');
$def->setAutoconfigured(true); $def->setAutoconfigured(true);
} }
/**
* @expectedException \Symfony\Component\DependencyInjection\Exception\BadMe
thodCallException
*/
public function testCannotCallSetInstanceofConditionals() public function testCannotCallSetInstanceofConditionals()
{ {
$this->expectException('Symfony\Component\DependencyInjection\Exception\ BadMethodCallException');
$def = new ChildDefinition('foo'); $def = new ChildDefinition('foo');
$def->setInstanceofConditionals(['Foo' => new ChildDefinition('')]); $def->setInstanceofConditionals(['Foo' => new ChildDefinition('')]);
} }
} }
 End of changes. 8 change blocks. 
14 lines changed or deleted 4 lines changed or added

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