diff --git a/DependencyInjection/Compiler/DynamicConfigPass.php b/DependencyInjection/Compiler/DynamicConfigPass.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/Compiler/DynamicConfigPass.php
+++ b/DependencyInjection/Compiler/DynamicConfigPass.php
@@ -45,8 +45,10 @@ class DynamicConfigPass implements CompilerPassInterface
         $container->setDefinition('session.handler', $handler);
 
         //cookie lifetime
-        $storage = $container->findDefinition('session.storage');
-        $storage->addMethodCall('setOptions', array(new Reference('claroline.session.storage_options')));
+        if ($container->getParameter('kernel.environment') !== 'test') {
+            $storage = $container->findDefinition('session.storage');
+            $storage->addMethodCall('setOptions', array(new Reference('claroline.session.storage_options')));
+        }
 
         //notification
         $container->setAlias('icap.notification.orm.entity_manager', 'claroline.persistence.object_manager');
[CoreBundle] Fixed config regression from 6c<I>dcc3e6 (closes #<I>)