PredisRedisClusterAdapterTest.php 745 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Cache\Tests\Adapter;
  11. class PredisRedisClusterAdapterTest extends AbstractRedisAdapterTest
  12. {
  13. public static function setUpBeforeClass()
  14. {
  15. if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) {
  16. self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.');
  17. }
  18. self::$redis = new \Predis\Client(explode(' ', $hosts), ['cluster' => 'redis']);
  19. }
  20. public static function tearDownAfterClass()
  21. {
  22. self::$redis = null;
  23. }
  24. }