From 9329b16ab13f3a4caf107df358c3c58bda2dcd8a Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 3 Nov 2010 18:35:31 +0100 Subject: [task/acm-refactor] Refactor the ACM classes to have a common interface. They are now refered to as cache drivers rather than ACM classes. The additional utility functions from the original cache class have been moved to the cache_service. The class loader is now instantiated without a cache instance and passed one as soon as it is constructed to allow autoloading the cache classes. PHPBB3-9983 --- tests/class_loader/cache_mock.php | 49 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) (limited to 'tests/class_loader/cache_mock.php') diff --git a/tests/class_loader/cache_mock.php b/tests/class_loader/cache_mock.php index b254978fcc..73d1e64cf5 100644 --- a/tests/class_loader/cache_mock.php +++ b/tests/class_loader/cache_mock.php @@ -8,7 +8,9 @@ * */ -class phpbb_cache_mock +require '../phpBB/includes/cache/driver/interface.php'; + +class phpbb_cache_mock implements phpbb_cache_driver_interface { private $variables = array(); @@ -22,8 +24,51 @@ class phpbb_cache_mock return false; } - function put($var_name, $value) + function put($var_name, $value, $ttl = 0) { $this->variables[$var_name] = $value; } + + function load() + { + } + function unload() + { + } + function save() + { + } + function tidy() + { + } + function purge() + { + } + function destroy($var_name, $table = '') + { + } + public function _exists($var_name) + { + } + public function sql_load($query) + { + } + public function sql_save($query, &$query_result, $ttl) + { + } + public function sql_exists($query_id) + { + } + public function sql_fetchrow($query_id) + { + } + public function sql_fetchfield($query_id, $field) + { + } + public function sql_rowseek($rownum, $query_id) + { + } + public function sql_freeresult($query_id) + { + } } -- cgit v1.2.1 From 1aef7eb20ee195c7f21d6c5b78653b7c43e669ec Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 9 Jan 2011 21:09:56 +0100 Subject: [task/acm-refactor] Cleaning up left over mentions of ACM and fixing tests. PHPBB3-9983 --- tests/class_loader/cache_mock.php | 74 --------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 tests/class_loader/cache_mock.php (limited to 'tests/class_loader/cache_mock.php') diff --git a/tests/class_loader/cache_mock.php b/tests/class_loader/cache_mock.php deleted file mode 100644 index 73d1e64cf5..0000000000 --- a/tests/class_loader/cache_mock.php +++ /dev/null @@ -1,74 +0,0 @@ -variables[$var_name])) - { - return $this->variables[$var_name]; - } - - return false; - } - - function put($var_name, $value, $ttl = 0) - { - $this->variables[$var_name] = $value; - } - - function load() - { - } - function unload() - { - } - function save() - { - } - function tidy() - { - } - function purge() - { - } - function destroy($var_name, $table = '') - { - } - public function _exists($var_name) - { - } - public function sql_load($query) - { - } - public function sql_save($query, &$query_result, $ttl) - { - } - public function sql_exists($query_id) - { - } - public function sql_fetchrow($query_id) - { - } - public function sql_fetchfield($query_id, $field) - { - } - public function sql_rowseek($rownum, $query_id) - { - } - public function sql_freeresult($query_id) - { - } -} -- cgit v1.2.1