minor #37375 Relax tests to unlock change on master (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
Relax tests to unlock change on master
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Required to make #37373 green.
Doesn't change any outcome.
Commits
-------
afe596e16a
Relax tests to unlock change on master
This commit is contained in:
commit
484dcbd682
@ -32,9 +32,11 @@ class CachePoolClearerPassTest extends TestCase
|
||||
$container->setParameter('kernel.root_dir', 'foo');
|
||||
|
||||
$globalClearer = new Definition(Psr6CacheClearer::class);
|
||||
$globalClearer->setPublic(true);
|
||||
$container->setDefinition('cache.global_clearer', $globalClearer);
|
||||
|
||||
$publicPool = new Definition();
|
||||
$publicPool->setPublic(true);
|
||||
$publicPool->addArgument('namespace');
|
||||
$publicPool->addTag('cache.pool', ['clearer' => 'clearer_alias']);
|
||||
$container->setDefinition('public.pool', $publicPool);
|
||||
@ -46,6 +48,7 @@ class CachePoolClearerPassTest extends TestCase
|
||||
$container->setDefinition('private.pool', $privatePool);
|
||||
|
||||
$clearer = new Definition();
|
||||
$clearer->setPublic(true);
|
||||
$container->setDefinition('clearer', $clearer);
|
||||
$container->setAlias('clearer_alias', 'clearer');
|
||||
|
||||
|
@ -57,12 +57,14 @@ class FormPassTest extends TestCase
|
||||
|
||||
$extDefinition = $container->getDefinition('form.extension');
|
||||
|
||||
$locator = $extDefinition->getArgument(0);
|
||||
$this->assertTrue(!$locator->isPublic() || $locator->isPrivate());
|
||||
$this->assertEquals(
|
||||
(new Definition(ServiceLocator::class, [[
|
||||
__CLASS__.'_Type1' => new ServiceClosureArgument(new Reference('my.type1')),
|
||||
__CLASS__.'_Type2' => new ServiceClosureArgument(new Reference('my.type2')),
|
||||
]]))->addTag('container.service_locator')->setPublic(false),
|
||||
$extDefinition->getArgument(0)
|
||||
$locator->setPublic(false)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,14 @@ class AddConstraintValidatorsPassTest extends TestCase
|
||||
$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()
|
||||
|
Reference in New Issue
Block a user