/** * test that durations greater than 30 days never expire * * @return void */ public function testLongDurationEqualToZero() { $memcache = new TestMemcacheEngine(); $memcache->settings['compress'] = false; $mock = $this->getMock('Memcache'); $memcache->setMemcache($mock); $mock->expects($this->once())->method('set')->with('key', 'value', false, 0); $value = 'value'; $memcache->write('key', $value, 50 * DAY); }
/** * test non latin domains. * * @return void */ public function testParseServerStringNonLatin() { $Memcache = new TestMemcacheEngine(); $result = $Memcache->parseServerString('schülervz.net:13211'); $this->assertEqual($result, array('schülervz.net', '13211')); $result = $Memcache->parseServerString('sülül:1111'); $this->assertEqual($result, array('sülül', '1111')); }