File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/Symfony/Component/VarDumper/Tests/Caster Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -46,24 +46,26 @@ public function testNotConnected()
46
46
47
47
public function testConnected ()
48
48
{
49
+ $ redisHost = getenv ('REDIS_HOST ' );
49
50
$ redis = new \Redis ();
50
- if (!@$ redis ->connect ('127.0.0.1 ' )) {
51
- $ e = error_get_last ();
52
- self ::markTestSkipped ($ e ['message ' ]);
51
+ try {
52
+ $ redis ->connect ($ redisHost );
53
+ } catch (\Exception $ e ) {
54
+ self ::markTestSkipped ($ e ->getMessage ());
53
55
}
54
56
55
57
if (\defined ('HHVM_VERSION_ID ' )) {
56
58
$ xCast = <<<'EODUMP'
57
59
Redis {
58
- #host: "127.0.0.1 "
60
+ #host: "$redisHost "
59
61
%A
60
62
}
61
63
EODUMP;
62
64
} else {
63
65
$ xCast = <<<'EODUMP'
64
66
Redis {%A
65
67
isConnected: true
66
- host: "127.0.0.1 "
68
+ host: "$redisHost "
67
69
port: 6379
68
70
auth: null
69
71
dbNum: 0
You can’t perform that action at this time.
0 commit comments