use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\TypedReference;
class AddConsoleCommandPassTest extends TestCase
{ /**
* @dataProvider visibilityProvider
*/
public function testProcess($public) { $container =
new ContainerBuilder();
$container->
addCompilerPass(new AddConsoleCommandPass(), PassConfig::TYPE_BEFORE_REMOVING
);
$container->
setParameter('my-command.class', 'Symfony\Component\Console\Tests\DependencyInjection\MyCommand'
);
$id = 'my-command';
$definition =
new Definition('%my-command.class%'
);
$definition->
setPublic($public);
$definition->
addTag('console.command'
);
$container->
setDefinition($id,
$definition);
$container->
compile();
$alias = 'console.command.public_alias.my-command';