This tests that the following dependencies are correctly processed:
A is public, B/C are private A -> C B -> C
public function testProcessRemovesAndInlinesRecursively() {
  $container = new ContainerBuilder();
  $a = $container
    ->register('a', '\\stdClass')
    ->addArgument(new Reference('c'));
  $b = $container
    ->register('b', '\\stdClass')
    ->addArgument(new Reference('c'))
    ->setPublic(false);
  $c = $container
    ->register('c', '\\stdClass')
    ->setPublic(false);
  $container
    ->compile();
  $this
    ->assertTrue($container
    ->hasDefinition('a'));
  $arguments = $a
    ->getArguments();
  $this
    ->assertSame($c, $arguments[0]);
  $this
    ->assertFalse($container
    ->hasDefinition('b'));
  $this
    ->assertFalse($container
    ->hasDefinition('c'));
}