PredisClientFeatures.php 624 B

123456789101112131415161718192021222324
  1. <?php
  2. define('I_AM_AWARE_OF_THE_DESTRUCTIVE_POWER_OF_THIS_TEST_SUITE', false);
  3. require_once 'PHPUnit/Framework.php';
  4. require_once 'PredisShared.php';
  5. class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
  6. public $redis;
  7. protected function setUp() {
  8. $this->redis = RC::getConnection();
  9. $this->redis->flushDatabase();
  10. }
  11. protected function tearDown() {
  12. }
  13. protected function onNotSuccessfulTest($exception) {
  14. // drops and reconnect to a redis server on uncaught exceptions
  15. RC::resetConnection();
  16. parent::onNotSuccessfulTest($exception);
  17. }
  18. }
  19. ?>