public function testReplace() { $newData = 'data to replace'; jCache::set('replace1Key', 'data one', 0, $this->profile); jCache::set('replace2Key', 'data two', 0, $this->profile); $this->assertFalse(jCache::replace('replace3Key', $newData, 0, $this->profile)); $this->assertTrue(jCache::replace('replace1Key', $newData, 0, $this->profile)); $this->assertTrue(jCache::get('replace1Key', $this->profile) == $newData); $this->assertTrue(jCache::replace('replace2Key', $newData, strtotime("-1 day"), $this->profile)); $this->assertFalse(jCache::get('replace2Key', $this->profile)); }