lithium\tests\integration\storage\SessionTest::testPhpReadWriteDelete PHP Method

testPhpReadWriteDelete() public method

    public function testPhpReadWriteDelete()
    {
        $this->skipIf(PHP_SAPI === 'cli', 'No PHP session support in cli SAPI.');
        $config = array('name' => 'phpInt');
        Session::config(array($config['name'] => array('adapter' => 'Php')));
        Session::clear($config);
        $key1 = 'key_one';
        $value1 = 'value_one';
        $key2 = 'key_two';
        $value2 = 'value_two';
        $this->assertNull(Session::read($key1, $config));
        $this->assertTrue(Session::write($key1, $value1, $config));
        $this->assertEqual($value1, Session::read($key1, $config));
        $this->assertNull(Session::read($key2, $config));
        $this->assertTrue(Session::delete($key1, $config));
        $this->assertNull(Session::read($key1, $config));
    }