From 1ca17962a2df0254ac4db0724d167351983c99e4 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 8 Jan 2015 14:44:40 +0100 Subject: test new it_cache behaviour --- tests/it_cache.t | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 tests/it_cache.t (limited to 'tests') diff --git a/tests/it_cache.t b/tests/it_cache.t new file mode 100755 index 0000000..cb11297 --- /dev/null +++ b/tests/it_cache.t @@ -0,0 +1,47 @@ +#!/www/server/bin/php + 1); +unset($GLOBALS['it_cache_local']); +ok(it_cache::get('it_cache_d', 'distributed' => 1) == '1'); + +it_cache::put('it_cache_d', false, 'distributed' => 1); +unset($GLOBALS['it_cache_local']); +ok(it_cache::get('it_cache_d', 'distributed' => 1) === ''); + +it_cache::put('it_cache_d', [2], 'distributed' => 1); +unset($GLOBALS['it_cache_local']); +ok(it_cache::get('it_cache_d', 'distributed' => 1) === [2]); + +ok(it_cache::get('it_cache_d'.rand(1, 1000), 'distributed' => 1) === null); + -- cgit v1.2.3