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

testDestroySession() public method

Tests the destroy
Since: 2015-07-17
Author: Sid Roberts ([email protected])
public testDestroySession ( )
    public function testDestroySession()
    {
        $this->specify("The session cannot be destroyed", 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);
            $session->destroy($sessionID);
            expect($session->read($sessionID))->equals(null);
        });
    }