valid() public method

public valid ( )
 public function testIterator()
 {
     $filter = new EventFilter($this->factory, $this->session);
     $event1 = new Event($this->factory, $this->getNodeTypeManager());
     $event1->setDate(2);
     $event2 = new Event($this->factory, $this->getNodeTypeManager());
     $event2->setDate(3);
     $this->transport->expects($this->once())->method('getEvents')->with(2, $filter, $this->session)->will($this->returnValue(new \ArrayIterator(array($event1, $event2))));
     $journal = new EventJournal($this->factory, $filter, $this->session, $this->transport);
     $journal->skipTo(2);
     $this->assertTrue($journal->valid());
     $this->assertSame($event1, $journal->current());
     $journal->next();
     $this->assertTrue($journal->valid());
     $this->assertSame($event2, $journal->current());
     $journal->next();
     $this->assertFalse($journal->valid());
     $journal->rewind();
     $this->assertTrue($journal->valid());
     $this->assertSame($event1, $journal->current());
 }