function CacheSavingCase::checkVariable

Check or a variable is stored and restored properly.

8 calls to CacheSavingCase::checkVariable()
CacheSavingCase::testArray in drupal-7.x/modules/simpletest/tests/cache.test
Test the saving and restoring of an array.
CacheSavingCase::testArray in drupal-7.x/modules/simpletest/tests/cache.test
Test the saving and restoring of an array.
CacheSavingCase::testDouble in drupal-7.x/modules/simpletest/tests/cache.test
Test the saving and restoring of a double.
CacheSavingCase::testDouble in drupal-7.x/modules/simpletest/tests/cache.test
Test the saving and restoring of a double.
CacheSavingCase::testInteger in drupal-7.x/modules/simpletest/tests/cache.test
Test the saving and restoring of an integer.

... See full list

Archivo

drupal-7.x/modules/simpletest/tests/cache.test, line 157

Class

CacheSavingCase

Código

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)))));
}