/** * Destroy any saved auth data. * * @return T_Auth_Driver fluent interface */ function destroy() { $this->session->delete($this->key); return $this; }
function testIfNoDefaultDriverLastDriverInStackIsUsed() { $original = array('name' => 'value', 'ns/name' => 'ns value'); $driver = new T_Test_Session_DriverStub($original); $session = new T_Session_Handler(); $session->addDriver(new T_Test_Session_DriverStub(array()), 'other')->addDriver($driver, 'ns'); $added = array('name2' => 'value2', 'ns/name2' => 'ns value 2', 'diff/name' => 'diff ns value'); foreach ($added as $key => $value) { $session->set($key, $value); } unset($session); // destruct $this->assertEquals($driver->getData(), $original + $added); }