function MemCacheSavingCase::checkVariable in Memcache API and Integration 6
Same name and namespace in other branches
- 7 tests/memcache.test \MemCacheSavingCase::checkVariable()
- 7 tests/memcache6.test \MemCacheSavingCase::checkVariable()
4 calls to MemCacheSavingCase::checkVariable()
- MemCacheSavingCase::testArray in tests/
memcache.test - Test the saving and restoring of an array.
- MemCacheSavingCase::testDouble in tests/
memcache.test - Test the saving and restoring of a double.
- MemCacheSavingCase::testInteger in tests/
memcache.test - Test the saving and restoring of an integer.
- MemCacheSavingCase::testString in tests/
memcache.test - Test the saving and restoring of a string.
File
- tests/
memcache.test, line 166
Class
Code
function checkVariable($var) {
cache_set('test_var', $var, 'cache');
$cache = cache_get('test_var', 'cache');
$this
->assertTrue(isset($cache->data) && $cache->data === $var, t('@type is saved and restored properly.', array(
'@type' => ucfirst(gettype($var)),
)));
}