aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/_bootstrap.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/_bootstrap.php')
-rw-r--r--tests/functional/_bootstrap.php39
1 files changed, 2 insertions, 37 deletions
diff --git a/tests/functional/_bootstrap.php b/tests/functional/_bootstrap.php
index 2ffdd75..4a71787 100644
--- a/tests/functional/_bootstrap.php
+++ b/tests/functional/_bootstrap.php
@@ -48,32 +48,8 @@ StudipMail::setDefaultTransporter(new debug_message_class());
require_once 'vendor/flexi/lib/flexi.php';
$GLOBALS['template_factory'] = new Flexi_TemplateFactory(dirname(dirname(__DIR__)) . '/templates');
-// create "fake" cache class
-if (!class_exists('StudipArrayCache')) {
- class StudipArrayCache implements StudipCache {
- public $data = [];
-
- function expire($key)
- {
- unset($this->data);
- }
-
- function flush()
- {
- $this->data = [];
- }
-
- function read($key)
- {
- return $this->data[$key];
- }
-
- function write($name, $content, $expire = 43200)
- {
- return ($this->data[$name] = $content);
- }
- }
-}
+// Disable caching to fallback to memory cache
+$GLOBALS['CACHING_ENABLE'] = false;
// SimpleORMapFake
if (!class_exists('StudipTestHelper')) {
@@ -81,13 +57,6 @@ if (!class_exists('StudipTestHelper')) {
{
static function set_up_tables($tables)
{
- // first step, set fake cache
- $testconfig = new Config(['cache_class' => 'StudipArrayCache']);
- Config::set($testconfig);
- StudipCacheFactory::setConfig($testconfig);
-
- $GLOBALS['CACHING_ENABLE'] = true;
-
$cache = StudipCacheFactory::getCache(false);
// second step, expire table scheme
@@ -120,10 +89,6 @@ if (!class_exists('StudipTestHelper')) {
static function tear_down_tables()
{
SimpleORMap::expireTableScheme();
- Config::set(null);
-
- StudipCacheFactory::setConfig(null);
- $GLOBALS['CACHING_ENABLE'] = false;
}
}
}