public function testSuccessivePeekCallsReturnTheSameValue() { $first = 'foo'; $second = 'bar'; $consumable = new Consumable(array($first, $second)); $this->assertSame($first, $consumable->peek()); $this->assertSame($first, $consumable->peek()); $this->assertSame($first, $consumable->consumeNext()); $this->assertSame($second, $consumable->peek()); $this->assertSame($second, $consumable->peek()); $this->assertSame($second, $consumable->consumeNext()); }