X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Ftwig%2Ftwig%2Ftest%2FTwig%2FTests%2FIntegrationTest.php;fp=vendor%2Ftwig%2Ftwig%2Ftest%2FTwig%2FTests%2FIntegrationTest.php;h=63e630ec1ff08e8469bd674e2d0a4085cbfbe443;hp=5d20112de30e8118375d0e25d1b3005a873bda91;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php b/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php index 5d20112de..63e630ec1 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); + } +}