From ccd177ada6823c27a6408427f19c238fd701c39e Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 6 Dec 2017 16:19:11 -0800 Subject: Store PHP sessions in the database --- tests/units/Core/Session/SessionStorageTest.php | 60 ------------------------- 1 file changed, 60 deletions(-) delete mode 100644 tests/units/Core/Session/SessionStorageTest.php (limited to 'tests/units/Core/Session/SessionStorageTest.php') diff --git a/tests/units/Core/Session/SessionStorageTest.php b/tests/units/Core/Session/SessionStorageTest.php deleted file mode 100644 index dd0040d5..00000000 --- a/tests/units/Core/Session/SessionStorageTest.php +++ /dev/null @@ -1,60 +0,0 @@ -something = array('a' => 'b'); - $this->assertEquals(array('a' => 'b'), $storage->something); - $this->assertTrue(isset($storage->something)); - $this->assertFalse(isset($storage->something->x)); - $this->assertFalse(isset($storage->notFound)); - $this->assertFalse(isset($storage->notFound->x)); - $this->assertFalse(isset($storage->notFound['x'])); - } - - public function testPersistentStorage() - { - $session = array('d' => 'e'); - - $storage = new SessionStorage(); - $storage->setStorage($session); - $storage->something = array('a' => 'b'); - - $this->assertEquals(array('a' => 'b'), $storage->something); - $this->assertEquals('e', $storage->d); - - $storage->something['a'] = 'c'; - $this->assertEquals('c', $storage->something['a']); - - $storage = null; - $this->assertEquals(array('something' => array('a' => 'c'), 'd' => 'e'), $session); - } - - public function testFlush() - { - $session = array('d' => 'e'); - - $storage = new SessionStorage(); - $storage->setStorage($session); - $storage->something = array('a' => 'b'); - - $this->assertEquals(array('a' => 'b'), $storage->something); - $this->assertEquals('e', $storage->d); - - $storage->flush(); - - $this->assertFalse(isset($storage->d)); - $this->assertFalse(isset($storage->something)); - - $storage->foo = 'bar'; - - $storage = null; - $this->assertEquals(array('foo' => 'bar'), $session); - } -} -- cgit v1.2.3