From 3dabbbd5325c9fad9582cd44b1da68dece78eaa0 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 21 Jun 2018 16:42:32 +0200 Subject: no reason for different naming --- test/it_cache.t | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 test/it_cache.t (limited to 'test/it_cache.t') diff --git a/test/it_cache.t b/test/it_cache.t new file mode 100755 index 0000000..8f804d4 --- /dev/null +++ b/test/it_cache.t @@ -0,0 +1,49 @@ +#!/www/server/bin/php + 1)); +it_cache::put('it_cache_d', 0); +unset($GLOBALS['it_cache_local']); +is(intval(it_cache::get('it_cache_d', array('distributed' => 1))), 42, "distributed put/get number"); + +it_cache::put('it_cache_d', false, array('distributed' => 1)); +it_cache::put('it_cache_d', 1); +unset($GLOBALS['it_cache_local']); +is(boolval(it_cache::get('it_cache_d', array('distributed' => 1))), false, "distributed put/get false"); + +it_cache::put('it_cache_d', array(2), array('distributed' => 1)); +it_cache::put('it_cache_d', 0); +unset($GLOBALS['it_cache_local']); +is(it_cache::get('it_cache_d', array('distributed' => 1)), array(2), "distributed put/get array"); + +is(it_cache::get('it_cache_d'.rand(1, 1000), array('distributed' => 1)), null, "distributed get unknown key"); -- cgit v1.2.3