MDL-41106 cache: several fixes for the session cache.
[moodle.git] / cache / tests / fixtures / lib.php
index f03a66c..b6d7358 100644 (file)
@@ -94,6 +94,24 @@ class cache_config_phpunittest extends cache_config_writer {
         );
     }
 
+    /**
+     * Forcefully adds a session store.
+     *
+     * @param string $name
+     */
+    public function phpunit_add_session_store($name) {
+        $this->configstores[$name] = array(
+            'name' => $name,
+            'plugin' => 'session',
+            'configuration' => array(),
+            'features' => 14,
+            'modes' => 2,
+            'default' => true,
+            'class' => 'cachestore_session',
+            'lock' => 'cachelock_file_default',
+        );
+    }
+
     /**
      * Forcefully injects a definition => store mapping.
      *