PropertyInfoPass example


    public function testServicesAreOrderedAccordingToPriority($index$tag)
    {
        $container = new ContainerBuilder();

        $definition = $container->register('property_info')->setArguments([null, null, null, null, null]);
        $container->register('n2')->addTag($tag['priority' => 100]);
        $container->register('n1')->addTag($tag['priority' => 200]);
        $container->register('n3')->addTag($tag);

        $propertyInfoPass = new PropertyInfoPass();
        $propertyInfoPass->process($container);

        $expected = new IteratorArgument([
            new Reference('n1'),
            new Reference('n2'),
            new Reference('n3'),
        ]);
        $this->assertEquals($expected$definition->getArgument($index));
    }

    public static function provideTags()
    {
Home | Imprint | This part of the site doesn't use cookies.