/**
* Tests DIC compilation.
*/
public function testCompileDIC() { // @todo: write a memory based storage backend for testing.
$modules_enabled =
[ 'system' => 'system',
'user' => 'user',
];
$request = Request::
createFromGlobals();
$this->
getTestKernel($request,
$modules_enabled);
// Instantiate it a second time and we should get the compiled Container
// class.
$kernel =
$this->
getTestKernel($request);
$container =
$kernel->
getContainer();
$refClass =
new \
ReflectionClass($container);
$is_compiled_container = !
$refClass->
isSubclassOf('Symfony\Component\DependencyInjection\ContainerBuilder'
);
$this->
assertTrue($is_compiled_container);
// Verify that the list of modules is the same for the initial and the
// compiled container.
$module_list =
array_keys($container->
get('module_handler'
)->
getModuleList());