Fix SCAN-based iterators following failing tests.

This commit is contained in:
Daniele Alessandri
2013-11-04 16:52:39 +01:00
parent b7f411a252
commit 85c978fdad
@@ -61,7 +61,7 @@ abstract class AbstractScanIterator implements Iterator
protected function requiredCommand(ClientInterface $client, $commandID)
{
if (!$client->getProfile()->supportsCommand($commandID)) {
throw new NotSupportedException("The specified server profile does not support the $commandID command.");
throw new NotSupportedException("The specified server profile does not support the `$commandID` command.");
}
}
@@ -137,7 +137,6 @@ abstract class AbstractScanIterator implements Iterator
public function rewind()
{
$this->reset();
$this->next();
}
/**
@@ -167,6 +166,8 @@ abstract class AbstractScanIterator implements Iterator
if ($this->elements) {
$this->extractNext();
} else if ($this->cursor) {
$this->next();
} else {
$this->valid = false;
}