diff --git a/modules/simpletest/tests/cache.test b/modules/simpletest/tests/cache.test index 1f3240d..664247b 100644 --- a/modules/simpletest/tests/cache.test +++ b/modules/simpletest/tests/cache.test @@ -152,14 +152,22 @@ class CacheSavingCase extends CacheTestCase { $this->assertTrue(isset($cached->data) && $cached->data == $test_object, t('Object is saved and restored properly.')); } - /* + /** * Check or a variable is stored and restored properly. - **/ + */ function checkVariable($var) { cache()->set('test_var', $var); $cached = cache()->get('test_var'); $this->assertTrue(isset($cached->data) && $cached->data === $var, t('@type is saved and restored properly.', array('@type' => ucfirst(gettype($var))))); } + + /** + * Test no empty cids are written in cache table. + */ + function testNoEmptyCids() { + $this->drupalGet('user/register'); + $this->assertFalse(cache_get(''), t('No cache entry is written with an empty cid.')); + } } /**