WordPress.org

Make WordPress Core

Changeset 944 in tests


Ignore:
Timestamp:
08/01/12 17:37:00 (21 months ago)
Author:
ryan
Message:

More cache replace assertions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/cache.php

    r934 r944  
    7070        $key = rand_str(); 
    7171        $val = rand_str(); 
     72        $val2 = rand_str(); 
    7273 
    7374        // memcached rejects replace() if the key does not exist 
    7475        $this->assertFalse($this->cache->replace($key, $val)); 
    7576        $this->assertFalse($this->cache->get($key)); 
     77        $this->assertTrue($this->cache->add($key, $val)); 
     78        $this->assertEquals($val, $this->cache->get($key)); 
     79        $this->assertTrue($this->cache->replace($key, $val2)); 
     80        $this->assertEquals($val2, $this->cache->get($key)); 
    7681    } 
    7782 
Note: See TracChangeset for help on using the changeset viewer.