Skip to content

Commit

Permalink
Merge branch '5.0' into 5.1
Browse files Browse the repository at this point in the history
* 5.0:
  Relax tests to unlock change on master
  [DI] fix dumping deprecated private aliases
  [DI] fix typo in Preloader
  • Loading branch information
nicolas-grekas committed Jun 22, 2020
2 parents 5e80f31 + a70795e commit dba9d9d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ public function testThatConstraintValidatorServicesAreProcessed()
$addConstraintValidatorsPass = new AddConstraintValidatorsPass();
$addConstraintValidatorsPass->process($container);

$locator = $container->getDefinition((string) $validatorFactory->getArgument(0));
$this->assertTrue(!$locator->isPublic() || $locator->isPrivate());
$expected = (new Definition(ServiceLocator::class, [[
Validator1::class => new ServiceClosureArgument(new Reference('my_constraint_validator_service1')),
'my_constraint_validator_alias1' => new ServiceClosureArgument(new Reference('my_constraint_validator_service1')),
Validator2::class => new ServiceClosureArgument(new Reference('my_constraint_validator_service2')),
]]))->addTag('container.service_locator')->setPublic(false);
$this->assertEquals($expected, $container->getDefinition((string) $validatorFactory->getArgument(0)));
$this->assertEquals($expected, $locator->setPublic(false));
}

public function testAbstractConstraintValidator()
Expand Down

0 comments on commit dba9d9d

Please sign in to comment.