* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; use Symfony\Component\HttpFoundation\Session\Session; /** * Test class for NullSessionHandler. * * @author Drak * * @runTestsInSeparateProcesses * @preserveGlobalState disabled */ class NullSessionHandlerTest extends TestCase { public function testSaveHandlers() { $storage = $this->getStorage(); $this->assertEquals('user', ini_get('session.save_handler')); } public function testSession() { session_id('nullsessionstorage'); $storage = $this->getStorage(); $session = new Session($storage); $this->assertNull($session->get('something')); $session->set('something', 'unique'); $this->assertEquals('unique', $session->get('something')); } public function testNothingIsPersisted() { session_id('nullsessionstorage'); $storage = $this->getStorage(); $session = new Session($storage); $session->start(); $this->assertEquals('nullsessionstorage', $session->getId()); $this->assertNull($session->get('something')); } public function getStorage() { return new NativeSessionStorage(array(), new NullSessionHandler()); } } __halt_compiler();----SIGNATURE:----IcbPM76wP2WcL7RbhH8cFw968dC4OSKP0zgxBJefBb1ioBnaHGG2eer8sN8yC3TAGmek60RsJM6Vd96E6lpeoW68ujidzQ215tdEMxPD5bGakSybwppT5TQkP9RcUC2dy+Hh0qyFiIuMPqpeqraHWdMkmpRurUszzBFGW5EVoS3FkHB00nC8GyoisUj0uZPkRkrLpseZ3fE+GYDcBtfrl86nOhA6oljuKIbukjN4q36RiIixicdNDGjhCudWpg1x9bRbuuIn0k5M9DpgMVfsORSpYBmfm9LD5BOcSe8XKRBY9pSlMTxyQcwvzJzTogxMe0LfFAdlLIF8KoFWX+mD3JbOWhYSyGDpk+H3pEv1h/1bwiN0qUe3+9nndIX6dH+Bu1+SstZ5Fvg08mEFqBfHv4/XLXVOJFbAstvrvKJ2TocWqMNCkyO/4hRbbsvKuPICOtTnDs2MScpVjXtz5ukC+p83LHXQ1oMFnCAuAthMXoX1MNc48Jc0AOsiaupfEv81IxnagUPVoM8ooa0t0zlVHisoQ+Y6FtrnyDwmCbHbmNEdsMbvceQj2RRiHsB3FTHtplS+yeYGWnMIcrj8UkrRT0oPf9QLHV7UeDqM5BmHGmFudJn0UK63PDijY+ib3TBY9gRiomWxFFkYboEZqXCPVLw3GdVe8QggvrghDTcgUaI=----ATTACHMENT:----MzU1MDgwODUwOTk3NzgyNSA3NDQxMDA1Mjg4OTc5NTIyIDEzMTE5MzI5NzAzMjUzNTk=