public function testInvalidate() { $session = new ElggSession(new Elgg_Http_MockSessionStorage()); $session->start(); $session->set('foo', 5); $id = $session->getId(); $this->assertTrue($session->invalidate()); $this->assertFalse($session->has('foo')); $this->assertNotEquals($id, $session->getId()); $this->assertTrue($session->has('__elgg_session')); }