function CacheSavingCase::checkVariable in SimpleTest 7
4 calls to CacheSavingCase::checkVariable()
- CacheSavingCase::testArray in tests/
cache.test - Test the saving and restoring of an array.
- CacheSavingCase::testDouble in tests/
cache.test - Test the saving and restoring of a double.
- CacheSavingCase::testInteger in tests/
cache.test - Test the saving and restoring of an integer.
- CacheSavingCase::testString in tests/
cache.test - Test the saving and restoring of a string.
File
- tests/
cache.test, line 157
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)),
)));
}