diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-10-01 15:13:31 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-10-03 23:51:16 +0200 |
commit | 5354c46e01a1efd65d4b53af12173ef4947eec9c (patch) | |
tree | c4f507eb072dd795c94f6a4fb88fcd8187d077ae /tests/cache/cache_memory_test.php | |
parent | 8e638dbf6d53be3d8c5b1eda8ce44e7e4f60b75a (diff) | |
download | forums-5354c46e01a1efd65d4b53af12173ef4947eec9c.tar forums-5354c46e01a1efd65d4b53af12173ef4947eec9c.tar.gz forums-5354c46e01a1efd65d4b53af12173ef4947eec9c.tar.bz2 forums-5354c46e01a1efd65d4b53af12173ef4947eec9c.tar.xz forums-5354c46e01a1efd65d4b53af12173ef4947eec9c.zip |
[ticket/11224] Updates tests
PHPBB3-11224
Diffstat (limited to 'tests/cache/cache_memory_test.php')
-rw-r--r-- | tests/cache/cache_memory_test.php | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/cache/cache_memory_test.php b/tests/cache/cache_memory_test.php index 7a529c1d04..9f92e8d8dc 100644 --- a/tests/cache/cache_memory_test.php +++ b/tests/cache/cache_memory_test.php @@ -1,17 +1,22 @@ <?php /** -* -* @package testing -* @copyright (c) 2014 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 -* -*/ + * + * This file is part of the phpBB Forum Software package. + * + * @copyright (c) phpBB Limited <https://www.phpbb.com> + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ require_once dirname(__FILE__) . '/cache_memory.php'; class phpbb_cache_memory_test extends phpbb_database_test_case { protected $cache; + protected $db; public function getDataSet() { @@ -25,6 +30,7 @@ class phpbb_cache_memory_test extends phpbb_database_test_case $this->cache = new phpbb_cache_memory(); $db = $this->new_dbal(); + $this->db = $db; } static public function cache_single_query_data() @@ -97,13 +103,11 @@ class phpbb_cache_memory_test extends phpbb_database_test_case */ public function test_cache_single_query($sql_queries, $table) { - global $db; - foreach ($sql_queries as $query) { - $sql_request_res = $db->sql_query($query[0]); + $sql_request_res = $this->db->sql_query($query[0]); - $this->cache->sql_save($query[0], $sql_request_res, 1); + $this->cache->sql_save($this->db, $query[0], $sql_request_res, 1); $results = array(); $query_id = $this->cache->sql_load($query[0]); |