RedisSessionHandlerTest

class RedisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase

Constants

PREFIX = 'prefix_';

Properties

protected RedisSessionHandler $storage from AbstractRedisSessionHandlerTestCase
protected Redis|RedisArray|RedisCluster|Client $redisClient from AbstractRedisSessionHandlerTestCase
protected Redis $validator from AbstractRedisSessionHandlerTestCase

Methods

protected Redis|RedisArray|RedisCluster|Client createRedisClient(string $host) No description
protected setUp() No description from AbstractRedisSessionHandlerTestCase
protected tearDown() No description from AbstractRedisSessionHandlerTestCase
public testOpenSession() No description from AbstractRedisSessionHandlerTestCase
public testCloseSession() No description from AbstractRedisSessionHandlerTestCase
public testReadSession() No description from AbstractRedisSessionHandlerTestCase
public testWriteSession() No description from AbstractRedisSessionHandlerTestCase
public testUseSessionGcMaxLifetimeAsTimeToLive() No description from AbstractRedisSessionHandlerTestCase
public testDestroySession() No description from AbstractRedisSessionHandlerTestCase
public testGcSession() No description from AbstractRedisSessionHandlerTestCase
public testUpdateTimestamp() No description from AbstractRedisSessionHandlerTestCase
public testSupportedParam(array $options, bool $supported) No description from AbstractRedisSessionHandlerTestCase
public array getOptionFixtures() No description from AbstractRedisSessionHandlerTestCase
protected setFixture($key, $value, $ttl = null) No description from AbstractRedisSessionHandlerTestCase
protected getFixture($key) No description from AbstractRedisSessionHandlerTestCase
protected bool hasFixture($key) No description from AbstractRedisSessionHandlerTestCase
protected int fixtureTtl($key) No description from AbstractRedisSessionHandlerTestCase

Details

at line 16

createRedisClient()

protected Redis|RedisArray|RedisCluster|Client createRedisClient(string $host)

Parameters

string $host

Return Value

Redis|RedisArray|RedisCluster|Client

setUp()

protected setUp()

tearDown()

protected tearDown()

testOpenSession()

public testOpenSession()

testCloseSession()

public testCloseSession()

testReadSession()

public testReadSession()

testWriteSession()

public testWriteSession()

testUseSessionGcMaxLifetimeAsTimeToLive()

public testUseSessionGcMaxLifetimeAsTimeToLive()

testDestroySession()

public testDestroySession()

testGcSession()

public testGcSession()

testUpdateTimestamp()

public testUpdateTimestamp()

testSupportedParam()

public testSupportedParam(array $options, bool $supported)

Parameters

array $options
bool $supported

getOptionFixtures()

public array getOptionFixtures()

Return Value

array

setFixture()

protected setFixture($key, $value, $ttl = null)

Parameters

$key
$value
$ttl

getFixture()

protected getFixture($key)

Parameters

$key

hasFixture()

protected bool hasFixture($key)

Parameters

$key

Return Value

bool

fixtureTtl()

protected int fixtureTtl($key)

Parameters

$key

Return Value

int

Source code

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * 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;

class RedisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
{
    protected function createRedisClient(string $host): \Redis
    {
        $client = new \Redis();
        $client->connect($host);

        return $client;
    }
}