コード例 #1
0
ファイル: CacheExceptionTest.php プロジェクト: ehough/stash
 public function testFlush()
 {
     $pool = new ehough_stash_Pool();
     $pool->setDriver(new ehough_stash_test_stub_DriverExceptionStub());
     $item = $pool->getItem('test');
     $this->assertFalse($item->isDisabled());
     $this->assertFalse($pool->flush());
     $item = $pool->getItem('test');
     $this->assertTrue($item->isDisabled(), 'Is disabled after exception is thrown in driver');
     $this->assertFalse($pool->flush());
 }
コード例 #2
0
 protected function getCache($session_id)
 {
     $path = '/' . base64_encode($this->path) . '/' . base64_encode($this->name) . '/' . base64_encode($session_id);
     return $this->pool->getItem($path);
 }