"Fossies" - the Fresh Open Source Software Archive  

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

AddConstraintValidatorsPassTest.php  (phplist-3.4.5.tgz):AddConstraintValidatorsPassTest.php  (phplist-3.4.6.tgz)
skipping to change at line 46 skipping to change at line 46
$addConstraintValidatorsPass->process($container); $addConstraintValidatorsPass->process($container);
$expected = (new Definition(ServiceLocator::class, [[ $expected = (new Definition(ServiceLocator::class, [[
Validator1::class => new ServiceClosureArgument(new Reference('my_co nstraint_validator_service1')), Validator1::class => new ServiceClosureArgument(new Reference('my_co nstraint_validator_service1')),
'my_constraint_validator_alias1' => new ServiceClosureArgument(new R eference('my_constraint_validator_service1')), 'my_constraint_validator_alias1' => new ServiceClosureArgument(new R eference('my_constraint_validator_service1')),
Validator2::class => new ServiceClosureArgument(new Reference('my_co nstraint_validator_service2')), Validator2::class => new ServiceClosureArgument(new Reference('my_co nstraint_validator_service2')),
]]))->addTag('container.service_locator')->setPublic(false); ]]))->addTag('container.service_locator')->setPublic(false);
$this->assertEquals($expected, $container->getDefinition((string) $valid atorFactory->getArgument(0))); $this->assertEquals($expected, $container->getDefinition((string) $valid atorFactory->getArgument(0)));
} }
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage The service "my_abstract_constraint_validator"
tagged "validator.constraint_validator" must not be abstract.
*/
public function testAbstractConstraintValidator() public function testAbstractConstraintValidator()
{ {
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('The service "my_abstract_constraint_valid
ator" tagged "validator.constraint_validator" must not be abstract.');
$container = new ContainerBuilder(); $container = new ContainerBuilder();
$container->register('validator.validator_factory') $container->register('validator.validator_factory')
->addArgument([]); ->addArgument([]);
$container->register('my_abstract_constraint_validator') $container->register('my_abstract_constraint_validator')
->setAbstract(true) ->setAbstract(true)
->addTag('validator.constraint_validator'); ->addTag('validator.constraint_validator');
$addConstraintValidatorsPass = new AddConstraintValidatorsPass(); $addConstraintValidatorsPass = new AddConstraintValidatorsPass();
$addConstraintValidatorsPass->process($container); $addConstraintValidatorsPass->process($container);
 End of changes. 2 change blocks. 
5 lines changed or deleted 3 lines changed or added

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