|
@@ -19,7 +19,7 @@ use Predis\Profile\ServerProfile;
|
|
|
/**
|
|
|
* @group realm-iterators
|
|
|
*/
|
|
|
-class SetIteratorTest extends StandardTestCase
|
|
|
+class SetKeyTest extends StandardTestCase
|
|
|
{
|
|
|
/**
|
|
|
* @group disconnected
|
|
@@ -34,7 +34,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->method('getProfile')
|
|
|
->will($this->returnValue(ServerProfile::get('2.0')));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set');
|
|
|
+ $iterator = new SetKey($client, 'key:set');
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -52,7 +52,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 0, array())
|
|
|
->will($this->returnValue(array(0, array())));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set');
|
|
|
+ $iterator = new SetKey($client, 'key:set');
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertFalse($iterator->valid());
|
|
@@ -73,7 +73,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 0, array())
|
|
|
->will($this->returnValue(array(0, array('member:1st', 'member:2nd', 'member:3rd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set');
|
|
|
+ $iterator = new SetKey($client, 'key:set');
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -113,7 +113,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 2, array())
|
|
|
->will($this->returnValue(array(0, array('member:3rd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set');
|
|
|
+ $iterator = new SetKey($client, 'key:set');
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -153,7 +153,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 4, array())
|
|
|
->will($this->returnValue(array(0, array('member:1st', 'member:2nd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set');
|
|
|
+ $iterator = new SetKey($client, 'key:set');
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -192,7 +192,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 5, array())
|
|
|
->will($this->returnValue(array(0, array('member:3rd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set');
|
|
|
+ $iterator = new SetKey($client, 'key:set');
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -228,7 +228,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 0, array('MATCH' => 'member:*'))
|
|
|
->will($this->returnValue(array(0, array('member:1st', 'member:2nd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set', 'member:*');
|
|
|
+ $iterator = new SetKey($client, 'key:set', 'member:*');
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -263,7 +263,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 1, array('MATCH' => 'member:*'))
|
|
|
->will($this->returnValue(array(0, array('member:2nd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set', 'member:*');
|
|
|
+ $iterator = new SetKey($client, 'key:set', 'member:*');
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -294,7 +294,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 0, array('COUNT' => 2))
|
|
|
->will($this->returnValue(array(0, array('member:1st', 'member:2nd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set', null, 2);
|
|
|
+ $iterator = new SetKey($client, 'key:set', null, 2);
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -329,7 +329,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 1, array('COUNT' => 1))
|
|
|
->will($this->returnValue(array(0, array('member:2nd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set', null, 1);
|
|
|
+ $iterator = new SetKey($client, 'key:set', null, 1);
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -360,7 +360,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 0, array('MATCH' => 'member:*', 'COUNT' => 2))
|
|
|
->will($this->returnValue(array(0, array('member:1st', 'member:2nd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set', 'member:*', 2);
|
|
|
+ $iterator = new SetKey($client, 'key:set', 'member:*', 2);
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -395,7 +395,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 1, array('MATCH' => 'member:*', 'COUNT' => 1))
|
|
|
->will($this->returnValue(array(0, array('member:2nd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set', 'member:*', 1);
|
|
|
+ $iterator = new SetKey($client, 'key:set', 'member:*', 1);
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|
|
@@ -426,7 +426,7 @@ class SetIteratorTest extends StandardTestCase
|
|
|
->with('key:set', 0, array())
|
|
|
->will($this->returnValue(array(0, array('member:1st', 'member:2nd'))));
|
|
|
|
|
|
- $iterator = new SetIterator($client, 'key:set');
|
|
|
+ $iterator = new SetKey($client, 'key:set');
|
|
|
|
|
|
$iterator->rewind();
|
|
|
$this->assertTrue($iterator->valid());
|