Created
March 15, 2016 09:10
-
-
Save arnolanglade/0d5c1c0c2a8064db23be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$collection->getIterator()->willReturn($iterator); | |
$iterator->rewind()->willReturn(null); | |
$valueCount = 1; | |
$iterator->valid()->will( | |
function () use (&$valueCount) { | |
return $valueCount-- > 0; | |
} | |
); | |
$iterator->current()->willReturn($value); | |
$iterator->next()->willReturn(null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment