summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorUrban Müller2025-10-10 17:48:46 +0200
committerUrban Müller2025-10-10 17:48:46 +0200
commitc2d94a790c0f8954a09ff0b51719f5381398beae (patch)
treebf62cfc7e92f641682c989593f5eb452028b0781 /test
parent781279e5e031ded28b83706fae16f358b43962d9 (diff)
downloaditools-c2d94a790c0f8954a09ff0b51719f5381398beae.tar.gz
itools-c2d94a790c0f8954a09ff0b51719f5381398beae.tar.bz2
itools-c2d94a790c0f8954a09ff0b51719f5381398beae.zip
slightly improve tests
Diffstat (limited to 'test')
-rwxr-xr-xtest/it_cache.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/it_cache.t b/test/it_cache.t
index e2e94bf..eb0df55 100755
--- a/test/it_cache.t
+++ b/test/it_cache.t
@@ -31,18 +31,20 @@ is(it_cache::get('it_cache_t'.rand(1, 1000)), null, "local get unknown key");
# test distributed memcache
$GLOBALS['debug_aslive'] = 1;
+is(class_exists("Memcached", false), true);
+
it_cache::put('it_cache_d', 42, ['distributed' => 1]);
-it_cache::put('it_cache_d', 0);
+it_cache::put('it_cache_d', 1);
unset($GLOBALS['it_cache_local']);
is(intval(it_cache::get('it_cache_d', ['distributed' => 1])), 42, "distributed put/get number");
it_cache::put('it_cache_d', false, ['distributed' => 1]);
-it_cache::put('it_cache_d', 1);
+it_cache::put('it_cache_d', 2);
unset($GLOBALS['it_cache_local']);
is(boolval(it_cache::get('it_cache_d', ['distributed' => 1])), false, "distributed put/get false");
it_cache::put('it_cache_d', [2], ['distributed' => 1]);
-it_cache::put('it_cache_d', 0);
+it_cache::put('it_cache_d', 3);
unset($GLOBALS['it_cache_local']);
is(it_cache::get('it_cache_d', ['distributed' => 1]), [2], "distributed put/get array");