* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Cache\Tests\Adapter; use Predis\Connection\StreamConnection; use Symfony\Component\Cache\Adapter\RedisAdapter; class PredisAdapterTest extends AbstractRedisAdapterTest { public static function setupBeforeClass() { parent::setupBeforeClass(); self::$redis = new \Predis\Client(array('host' => getenv('REDIS_HOST'))); } public function testCreateConnection() { $redisHost = getenv('REDIS_HOST'); $redis = RedisAdapter::createConnection('redis://'.$redisHost.'/1', array('class' => \Predis\Client::class, 'timeout' => 3)); $this->assertInstanceOf(\Predis\Client::class, $redis); $connection = $redis->getConnection(); $this->assertInstanceOf(StreamConnection::class, $connection); $params = array( 'scheme' => 'tcp', 'host' => $redisHost, 'path' => '', 'dbindex' => '1', 'port' => 6379, 'class' => 'Predis\Client', 'timeout' => 3, 'persistent' => 0, 'persistent_id' => null, 'read_timeout' => 0, 'retry_interval' => 0, 'lazy' => false, 'database' => '1', 'password' => null, ); $this->assertSame($params, $connection->getParameters()->toArray()); } } __halt_compiler();----SIGNATURE:----JyTRrO+YCOLKmLA+fcS99l3tf3C52LnontoY6ra2H9YAbEE+VgcSFtu1nRYER6dUn0zrivhS0MmHSTfURbYcvh+AT2KIQOOAsrvvobQymWOhcpPVL70pOOgfX+d7/J7dswtcC9IaS0ExIL4ep3+AwdAjM++NDgPlk7b77W+J5FweCdWAh0Pg3htJ5+OUYHWLS+zJxV6qov3/h4cOqIag2hOWV4Re3tvtLI+CnxHX3HyYgKcSVr9H4az8U4bBaFSxJq5xtSjVZxJO6WjcEjVRH+MpVal208sAk9Esjg1L237EqeCL4p1pk+omfQ96HL40FIM1oU+2DO4y6a6s0HOcHtG9S734jSB9x78Cs7OBVWSpfsFkUbRFDMEIx1qV1vs2wnUN0ETvHBzsa5MqhVpgsIL1WbCPqFXKuWMhNCh6luLEY8gFX5qoSrZd9fPwaNvgeFHwricrMO8F8zoo8wTIfKM3QDLWbLapwjmSNHq9Xoik5Q7cQ8poXtVqHSra/6Y45REZckE8rdPnyoQ4sv+R0qyDJuBVycEJ8QpxWjXg9Z/iWXtgPpAFujgg05NVpiKupDBgShW36ikhFwfUAE8lW6RoY0gXFCtJEiad/n556gXBZe3FuiEjwE4z8/8MrvKKirQU3VKN6GCTzscKS5cX0j2BF5eB5SyemCSQ8uLpPfQ=----ATTACHMENT:----NzE0Mzc2MzE4MjExNjc3MyA1MjUzOTM5MTMwOTg3MTc4IDkwODMzMjM3NzUyMTM4MjM=