aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cache/file_driver_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cache/file_driver_test.php')
-rw-r--r--tests/cache/file_driver_test.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/cache/file_driver_test.php b/tests/cache/file_driver_test.php
index 2353940277..745c6bb081 100644
--- a/tests/cache/file_driver_test.php
+++ b/tests/cache/file_driver_test.php
@@ -66,42 +66,4 @@ class phpbb_cache_file_driver_test extends phpbb_cache_common_test_case
}
rmdir($this->cache_dir);
}
-
- public function test_cache_sql()
- {
- global $db, $cache;
- $db = $this->new_dbal();
- $cache = new phpbb_cache_service($this->driver);
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
-
- $cache_path = $this->cache_dir . 'sql_' . md5(preg_replace('/[\n\r\s\t]+/', ' ', $sql)) . '.php';
- $this->assertFileNotExists($cache_path);
-
- $result = $db->sql_query($sql, 300);
- $first_result = $db->sql_fetchrow($result);
- $expected = array('config_name' => 'foo', 'config_value' => '23', 'is_dynamic' => 0);
- $this->assertEquals($expected, $first_result);
-
- $this->assertFileExists($cache_path);
-
- $sql = 'DELETE FROM phpbb_config';
- $result = $db->sql_query($sql);
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
- $result = $db->sql_query($sql, 300);
-
- $this->assertEquals($expected, $db->sql_fetchrow($result));
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
- $result = $db->sql_query($sql);
-
- $no_cache_result = $db->sql_fetchrow($result);
- $this->assertSame(false, $no_cache_result);
-
- $db->sql_close();
- }
}