Преглед на файлове

Skip integration tests for HyperLogLog commands on Redis < 2.8.9.

Caught this by running the test suite on TravisCI which still runs an
older version of Redis 2.8. We should find a more decent way to handle
differences in profiles when commands get added between patch releases
of Redis, our custom skip method will do for now.
Daniele Alessandri преди 10 години
родител
ревизия
87417f4d7e
променени са 3 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 2 0
      tests/Predis/Command/HyperLogLogAddTest.php
  2. 4 0
      tests/Predis/Command/HyperLogLogCountTest.php
  3. 2 0
      tests/Predis/Command/HyperLogLogMergeTest.php

+ 2 - 0
tests/Predis/Command/HyperLogLogAddTest.php

@@ -80,6 +80,8 @@ class HyperLogLogAddTest extends PredisCommandTestCase
      */
     public function testThrowsExceptionOnWrongType()
     {
+        $this->markTestSkippedOnRedisVersionBelow('2.8.9', 'HyperLogLog requires Redis >= 2.8.9.', true);
+
         $redis = $this->getClient();
 
         $redis->lpush('metavars', 'foo', 'hoge');

+ 4 - 0
tests/Predis/Command/HyperLogLogCountTest.php

@@ -81,6 +81,8 @@ class HyperLogLogCountTest extends PredisCommandTestCase
      */
     public function testThrowsExceptionOnWrongType()
     {
+        $this->markTestSkippedOnRedisVersionBelow('2.8.9', 'HyperLogLog requires Redis >= 2.8.9.', true);
+
         $redis = $this->getClient();
 
         $redis->lpush('metavars', 'foo', 'hoge');
@@ -94,6 +96,8 @@ class HyperLogLogCountTest extends PredisCommandTestCase
      */
     public function testThrowsExceptionOnWrongTypeOfAtLeastOneKey()
     {
+        $this->markTestSkippedOnRedisVersionBelow('2.8.9', 'HyperLogLog requires Redis >= 2.8.9.', true);
+
         $redis = $this->getClient();
 
         $redis->pfadd('metavars:1', 'foo', 'hoge');

+ 2 - 0
tests/Predis/Command/HyperLogLogMergeTest.php

@@ -77,6 +77,8 @@ class HyperLogLogMergeTest extends PredisCommandTestCase
      */
     public function testThrowsExceptionOnWrongType()
     {
+        $this->markTestSkippedOnRedisVersionBelow('2.8.9', 'HyperLogLog requires Redis >= 2.8.9.', true);
+
         $redis = $this->getClient();
 
         $redis->pfadd('metavars:1', 'foo', 'hoge');