@@ -218,7 +218,7 @@ public function testRename() {
218
218
public function testRenameNx () {
219
219
220
220
// strings
221
- $ this ->redis ->delete ('key0 ' );
221
+ $ this ->redis ->delete ('key0 ' , ' key1 ' );
222
222
$ this ->redis ->set ('key0 ' , 'val0 ' );
223
223
$ this ->redis ->set ('key1 ' , 'val1 ' );
224
224
$ this ->assertTrue ($ this ->redis ->renameNx ('key0 ' , 'key1 ' ) === FALSE );
@@ -232,12 +232,12 @@ public function testRenameNx() {
232
232
$ this ->redis ->lPush ('key0 ' , 'val1 ' );
233
233
$ this ->redis ->lPush ('key1 ' , 'val1-0 ' );
234
234
$ this ->redis ->lPush ('key1 ' , 'val1-1 ' );
235
- $ this ->redis ->renameNx ('key0 ' , 'key1 ' );
235
+ $ this ->assertTrue ( $ this -> redis ->renameNx ('key0 ' , 'key1 ' ) === FALSE );
236
236
$ this ->assertTrue ($ this ->redis ->lGetRange ('key0 ' , 0 , -1 ) === array ('val1 ' , 'val0 ' ));
237
237
$ this ->assertTrue ($ this ->redis ->lGetRange ('key1 ' , 0 , -1 ) === array ('val1-1 ' , 'val1-0 ' ));
238
238
239
239
$ this ->redis ->delete ('key2 ' );
240
- $ this ->redis ->renameNx ('key0 ' , 'key2 ' );
240
+ $ this ->assertTrue ( $ this -> redis ->renameNx ('key0 ' , 'key2 ' ) === TRUE );
241
241
$ this ->assertTrue ($ this ->redis ->lGetRange ('key0 ' , 0 , -1 ) === array ());
242
242
$ this ->assertTrue ($ this ->redis ->lGetRange ('key2 ' , 0 , -1 ) === array ('val1 ' , 'val0 ' ));
243
243
0 commit comments