public function testClose()
 {
     $saveHandler = new Memcached($this->memcached);
     // should always return true
     $this->assertTrue($saveHandler->close());
 }
Пример #2
0
 /**
  * @runInSeparateProcess
  */
 public function testHandlerInjectionSucceeds()
 {
     // create connection to memcached
     $memcached = new \Memcached();
     $memcached->addServer('localhost', 11211);
     // register handler (PHP 5.3 compatible)
     $handler = new Memcached($memcached);
     $session = new Session($handler);
     $session->start();
     $session['serialisation'] = 'should be in json';
     $this->assertEquals('should be in json', $session['serialisation']);
     $session->close();
     $session->destroy();
 }