@@ -75,6 +75,8 @@ public function setUp() {
7575 $ this ->redis = $ this ->newInstance ();
7676 $ info = $ this ->redis ->info ();
7777 $ this ->version = (isset ($ info ['redis_version ' ])?$ info ['redis_version ' ]:'0.0.0 ' );
78+
79+ $ this ->is_keydb = $ this ->redis ->info ('keydb ' ) !== false ;
7880 }
7981
8082 protected function minVersionCheck ($ version ) {
@@ -265,9 +267,11 @@ public function testBitcount() {
265267 $ this ->redis ->set ('bitcountkey ' , hex2bin ('10eb8939e68bfdb640260f0629f3 ' ));
266268 $ this ->assertEquals (1 , $ this ->redis ->bitcount ('bitcountkey ' , 8 , 8 , false ));
267269
268- /* key, start, end, BIT */
269- $ this ->redis ->set ('bitcountkey ' , hex2bin ('cd0e4c80f9e4590d888a10 ' ));
270- $ this ->assertEquals (5 , $ this ->redis ->bitcount ('bitcountkey ' , 0 , 9 , true ));
270+ if ( ! $ this ->is_keydb ) {
271+ /* key, start, end, BIT */
272+ $ this ->redis ->set ('bitcountkey ' , hex2bin ('cd0e4c80f9e4590d888a10 ' ));
273+ $ this ->assertEquals (5 , $ this ->redis ->bitcount ('bitcountkey ' , 0 , 9 , true ));
274+ }
271275 }
272276
273277 public function testBitop () {
@@ -331,6 +335,8 @@ public function testBitsets() {
331335 }
332336
333337 public function testLcs () {
338+ if ( ! $ this ->minVersionCheck ('7.0.0 ' ) || $ this ->is_keydb )
339+ $ this ->markTestSkipped ();
334340
335341 $ key1 = '{lcs}1 ' ; $ key2 = '{lcs}2 ' ;
336342 $ this ->assertTrue ($ this ->redis ->set ($ key1 , '12244447777777 ' ));
@@ -7094,7 +7100,12 @@ public function testXAutoClaim() {
70947100
70957101 // Test an empty xautoclaim reply
70967102 $ res = $ this ->redis ->xAutoClaim ('ships ' , 'combatants ' , 'Sisko ' , 0 , '0-0 ' );
7097- $ this ->assertEquals (['0-0 ' , [], []], $ res );
7103+ $ this ->assertTrue (is_array ($ res ) && (count ($ res ) == 2 || count ($ res ) == 3 ));
7104+ if (count ($ res ) == 2 ) {
7105+ $ this ->assertEquals (['0-0 ' , []], $ res );
7106+ } else {
7107+ $ this ->assertEquals (['0-0 ' , [], []], $ res );
7108+ }
70987109
70997110 $ this ->redis ->xAdd ('ships ' , '1424-74205 ' , ['name ' => 'Defiant ' ]);
71007111
@@ -7108,9 +7119,9 @@ public function testXAutoClaim() {
71087119 // Assume control of the pending message with a different consumer.
71097120 $ res = $ this ->redis ->xAutoClaim ('ships ' , 'combatants ' , 'Sisko ' , 0 , '0-0 ' );
71107121
7111- $ this ->assertTrue ($ res && count ($ res ) == 3 && $ res[ 0 ] == ' 0-0 ' &&
7112- isset ($ res [1 ]['1424-74205 ' ]['name ' ]) &&
7113- $ res [1 ]['1424-74205 ' ]['name ' ] == 'Defiant ' );
7122+ $ this ->assertTrue ($ res && ( count ($ res ) == 2 || count ( $ res) == 3 ));
7123+ $ this -> assertTrue ( isset ($ res [1 ]['1424-74205 ' ]['name ' ]) &&
7124+ $ res [1 ]['1424-74205 ' ]['name ' ] == 'Defiant ' );
71147125
71157126 // Now the 'Sisko' consumer should own the message
71167127 $ pending = $ this ->redis ->xPending ('ships ' , 'combatants ' );
@@ -7640,9 +7651,12 @@ public function testCommand()
76407651 $ commands = $ this ->redis ->command ();
76417652 $ this ->assertTrue (is_array ($ commands ));
76427653 $ this ->assertEquals (count ($ commands ), $ this ->redis ->command ('count ' ));
7643- $ infos = $ this ->redis ->command ('info ' );
7644- $ this ->assertTrue (is_array ($ infos ));
7645- $ this ->assertEquals (count ($ infos ), count ($ commands ));
7654+
7655+ if (!$ this ->is_keydb ) {
7656+ $ infos = $ this ->redis ->command ('info ' );
7657+ $ this ->assertTrue (is_array ($ infos ));
7658+ $ this ->assertEquals (count ($ infos ), count ($ commands ));
7659+ }
76467660
76477661 if (version_compare ($ this ->version , '7.0 ' ) >= 0 ) {
76487662 $ docs = $ this ->redis ->command ('docs ' );
0 commit comments