Check or a variable is stored and restored properly.
function checkVariable($var) {
cache_set('test_var', $var, 'cache');
$cache = cache_get('test_var', 'cache');
$this
->assertTrue(isset($cache->data) && $cache->data === $var, format_string('@type is saved and restored properly.', array(
'@type' => ucfirst(gettype($var)),
)));
}