Phalcon\Test\Unit\Session\Adapter\LibmemcacheTest::testReadAndWriteSession PHP Method

testReadAndWriteSession() public method

Tests read and write
Since: 2015-07-17
Author: Sid Roberts ([email protected])
    public function testReadAndWriteSession()
    {
        $this->specify("The session cannot be read or written from", function () {
            $sessionID = "abcdef123456";
            $session = new Libmemcached(['servers' => [["host" => TEST_MC_HOST, "port" => TEST_MC_PORT]], 'client' => []]);
            $data = serialize(["abc" => "123", "def" => "678", "xyz" => "zyx"]);
            $session->write($sessionID, $data);
            expect($session->read($sessionID))->equals($data);
        });
    }