diff options
author | Urban Müller | 2020-04-21 01:03:53 +0200 |
---|---|---|
committer | Urban Müller | 2020-04-21 01:03:53 +0200 |
commit | d987adefc85095f057c3d6d3eb2fa4c0d487d32b (patch) | |
tree | 4a6f7be8e35ff0c412666c41a46f22383d8ed5c2 /test/it_cache.t | |
parent | 1bd13e02d21ba01f38cd6df04de84b25a75a5264 (diff) | |
download | itools-d987adefc85095f057c3d6d3eb2fa4c0d487d32b.tar.gz itools-d987adefc85095f057c3d6d3eb2fa4c0d487d32b.tar.bz2 itools-d987adefc85095f057c3d6d3eb2fa4c0d487d32b.zip |
use new array syntax
Diffstat (limited to 'test/it_cache.t')
-rwxr-xr-x | test/it_cache.t | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/it_cache.t b/test/it_cache.t index 8f804d4..e2e94bf 100755 --- a/test/it_cache.t +++ b/test/it_cache.t @@ -8,8 +8,8 @@ is(it_cache::get('it_cache_t'), 42, "cache put number"); it_cache::put('it_cache_t', false); is(it_cache::get('it_cache_t'), false, "cache get number"); -it_cache::put('it_cache_t', array(2)); -is(it_cache::get('it_cache_t'), array(2), "cache put/get array"); +it_cache::put('it_cache_t', [2]); +is(it_cache::get('it_cache_t'), [2], "cache put/get array"); # test non-distributed apc cache @@ -21,9 +21,9 @@ it_cache::put('it_cache_t', false); unset($GLOBALS['it_cache_local']); is(it_cache::get('it_cache_t'), false, "local put/get false"); -it_cache::put('it_cache_t', array(2)); +it_cache::put('it_cache_t', [2]); unset($GLOBALS['it_cache_local']); -is(it_cache::get('it_cache_t'), array(2), "local put/get array"); +is(it_cache::get('it_cache_t'), [2], "local put/get array"); is(it_cache::get('it_cache_t'.rand(1, 1000)), null, "local get unknown key"); @@ -31,19 +31,19 @@ is(it_cache::get('it_cache_t'.rand(1, 1000)), null, "local get unknown key"); # test distributed memcache $GLOBALS['debug_aslive'] = 1; -it_cache::put('it_cache_d', 42, array('distributed' => 1)); +it_cache::put('it_cache_d', 42, ['distributed' => 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"); +is(intval(it_cache::get('it_cache_d', ['distributed' => 1])), 42, "distributed put/get number"); -it_cache::put('it_cache_d', false, array('distributed' => 1)); +it_cache::put('it_cache_d', false, ['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"); +is(boolval(it_cache::get('it_cache_d', ['distributed' => 1])), false, "distributed put/get false"); -it_cache::put('it_cache_d', array(2), array('distributed' => 1)); +it_cache::put('it_cache_d', [2], ['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', ['distributed' => 1]), [2], "distributed put/get array"); -is(it_cache::get('it_cache_d'.rand(1, 1000), array('distributed' => 1)), null, "distributed get unknown key"); +is(it_cache::get('it_cache_d'.rand(1, 1000), ['distributed' => 1]), null, "distributed get unknown key"); |