throw new Exception('__toString shall not be called on \Countables');
}
}
+
+/**
+ * This class is used in tests for the length filter
+ */
+class IteratorAggregateStub implements \IteratorAggregate
+{
+ private $data;
+
+ public function __construct(array $data)
+ {
+ $this->data = $data;
+ }
+
+ public function getIterator()
+ {
+ return new ArrayIterator($this->data);
+ }
+}