X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Ftwig%2Ftwig%2Ftest%2FTwig%2FTests%2FIntegrationTest.php;h=9cbb15904b119d26a975038b30b603b433a2ed2c;hb=refs%2Fheads%2Ft2;hp=5d20112de30e8118375d0e25d1b3005a873bda91;hpb=eba34333e3c89f208d2f72fa91351ad019a71583;p=yaffs-website diff --git a/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php b/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php index 5d20112de..9cbb15904 100644 --- a/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php +++ b/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php @@ -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); + } +}