public static function setContainerWithKernel() { $container =
new ContainerBuilder();
$kernel =
new DrupalKernel('test', NULL
);
// Objects of the same type will have access to each others private and
// protected members even though they are not the same instances. This is
// because the implementation specific details are already known when
// inside those objects.
$kernel->container =
$container;
$container->
set('kernel',
$kernel);
$container->
set(ReverseContainer::
class,
new ReverseContainer($container));
\Drupal::
setContainer($container);
return $container;
}}