コード例 #1
0
 public function testGetMax()
 {
     $this->assertEquals($this->time, $this->driver->getMax([$this->time]));
     $foo_time = new \DateTime();
     $foo_time->modify('+1 day');
     $this->memcache->expects($this->once())->method('get')->with(self::KEY_PREFIX . self::DATE_KEY)->will($this->returnValue($foo_time->getTimestamp()));
     $this->assertEquals($foo_time, $this->driver->getMax([self::DATE_KEY, $this->time]));
 }
コード例 #2
0
ファイル: MemcacheTest.php プロジェクト: phlib/db
 public function testSetHistoryUsesHost()
 {
     $host = 'test-host';
     $this->memcache->expects($this->once())->method('set')->with($this->stringContains($host));
     $this->storage->setHistory($host, [123, 123, 123, 23, 23, 3]);
 }