4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpKernel\Tests\Profiler;
14 use Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage;
15 use Symfony\Component\HttpKernel\Tests\Profiler\Mock\RedisMock;
20 class RedisProfilerStorageTest extends AbstractProfilerStorageTest
22 protected static $storage;
24 protected function setUp()
26 $redisMock = new RedisMock();
27 $redisMock->connect('127.0.0.1', 6379);
29 self::$storage = new RedisProfilerStorage('redis://127.0.0.1:6379', '', '', 86400);
30 self::$storage->setRedis($redisMock);
33 self::$storage->purge();
37 protected function tearDown()
40 self::$storage->purge();
41 self::$storage = false;
46 * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface
48 protected function getStorage()
50 return self::$storage;