Changeset 23 in tests
- Timestamp:
- 09/22/2007 04:25:07 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-testcase/test_includes_cache.php
r5 r23 51 51 52 52 function test_not_expired() { 53 // this fails - looks like the object cache doesn't expire54 53 $key = rand_str(); 55 54 $val = rand_str(); … … 87 86 } 88 87 88 function test_individual_expiry() { 89 // FIXME: this is a current bug 90 $this->markTestSkipped(); 91 92 $key = rand_str(); 93 $val = rand_str(); 94 95 // http://trac.wordpress.org/ticket/4179 96 // individual expiration parameters are ignored 97 // this should expire after 1 second 98 $this->assertTrue($this->cache1->add($key, $val, '', 1)); 99 $this->assertTrue($this->cache1->save()); 100 101 // not yet expired 102 $this->assertEquals($val, $this->cache1->get($key)); 103 $this->assertEquals($val, $this->cache2->get($key)); 104 105 // 3 seconds later, key should have expired 106 sleep(3); 107 $this->assertEquals(NULL, $this->cache2->get($key)); 108 // cache1's key is still cached in memory, which doesn't expire 109 $this->assertEquals($val, $this->cache1->get($key)); 110 } 89 111 } 90 112
Note: See TracChangeset
for help on using the changeset viewer.