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\VarDumper\Tests\Caster;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
18 * @author Nicolas Grekas <p@tchwork.com>
19 * @requires extension redis
21 class RedisCasterTest extends TestCase
23 use VarDumperTestTrait;
25 public function testNotConnected()
27 $redis = new \Redis();
29 if (\defined('HHVM_VERSION_ID')) {
44 $this->assertDumpMatchesFormat($xCast, $redis);
47 public function testConnected()
49 $redis = new \Redis();
50 if (!@$redis->connect('127.0.0.1')) {
51 $e = error_get_last();
52 self::markTestSkipped($e['message']);
55 if (\defined('HHVM_VERSION_ID')) {
82 $this->assertDumpMatchesFormat($xCast, $redis);