Security update for Core, with self-updated composer
[yaffs-website] / vendor / twig / twig / test / Twig / Tests / IntegrationTest.php
index 5d20112de30e8118375d0e25d1b3005a873bda91..63e630ec1ff08e8469bd674e2d0a4085cbfbe443 100644 (file)
@@ -307,3 +307,21 @@ class CountableStub implements \Countable
         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);
+    }
+}