Example #1
0
 /**
  * Test: Replace an existing value.
  *
  * @author Benjamin Carl <*****@*****.**>
  * @return void
  * @access protected
  */
 public function testReplaceAnExistingValue()
 {
     srand(microtime(true));
     $value = md5(rand(1, 65535));
     $this->assertFalse($this->client->replace($this->key, $value));
     // Should here return TRUE cause key does not exist
     $this->assertTrue($this->client->set($this->key, $this->value));
     $this->assertTrue($this->client->replace($this->key, $value));
     $this->assertEquals($value, $this->client->get($this->key));
 }