* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Tests\Compiler; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; use Symfony\Component\DependencyInjection\Compiler\ResolveTaggedIteratorArgumentPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; /** * @author Roland Franssen */ class ResolveTaggedIteratorArgumentPassTest extends TestCase { public function testProcess() { $container = new ContainerBuilder(); $container->register('a', 'stdClass')->addTag('foo'); $container->register('b', 'stdClass')->addTag('foo', array('priority' => 20)); $container->register('c', 'stdClass')->addTag('foo', array('priority' => 10)); $container->register('d', 'stdClass')->setProperty('foos', new TaggedIteratorArgument('foo')); (new ResolveTaggedIteratorArgumentPass())->process($container); $properties = $container->getDefinition('d')->getProperties(); $expected = new TaggedIteratorArgument('foo'); $expected->setValues(array(new Reference('b'), new Reference('c'), new Reference('a'))); $this->assertEquals($expected, $properties['foos']); } } __halt_compiler();----SIGNATURE:----DOIWBnJzCxRHymClulkMwqWsGthdIPw5zZC/t3bipLAkqiSnWAC10fhKscfXKbk1UgQvLho15Cizj/iR+TWhAos3hmD89lAjLinzieftNNmcxVufXAtaJW39TYkv9rw9bdCYmlYTBMwJjeT8Iy1cerdoLaN93JKXfP8Q9lf/4onQabCk8yG6szQXQ95E0GxKQcM8hsrzMiAVmYLkog9i5qo2BtwbQ3ZgBEvrClbmLAC7jKJlEtIR5CEzTOEKXoRF54yUtp/jg179U3x0rHUitl2oWBi6YUcoKTIiezifrYHbJAg+cBJ4DZG9t6Z350GNBkwUs2NhAIYaG8sp0gVhOKGZRKeNKSG3/THISW7Xh9DdnvFepHUE3fFUw5KksUftKKQD4ZiuiaE9+gedBqODztAvNPR9+qXl1gU2mFHgU44PrfXUVZLUlGSdqc9OvjEseJ3arFggBKnO6G65+Jaen/5DFFTIZ+0QnJwUuW+Fg5vpJRnBQRhdC4I2S5UcSXiENBdwNh+qntnlz2+H1D/Z50JZtIn4G+h7N3MyCT7TLaQ366sfJEZDgFOAh4pP7JWiq0lhc8VxcP7V1oHIibrxGgYO6ZOmik1VFW914KYju1y/AnRQrwX5KR1O+u0wruxipXqqakcJYBAVUVlxEexS+l85eg97P7k8dWbP9+/OPnc=----ATTACHMENT:----NzAwNTk0ODczOTgwMjEyOCAxNjIyNzk5NDEzMjQ4NDkxIDU3MzQ2MTcxNDI2MjIxNzU=