/** * @covers CollectionType\Iterator\IteratorAbstract::isEmpty */ public function testIsEmptyForFewValues() { $this->iterator->add('A'); $this->iterator->add('B'); $result = $this->iterator->isEmpty(); $this->assertFalse($result); }
/** * @covers CollectionType\Iterator\IteratorAbstract::next */ public function testNextForFewValues() { $this->iterator->add('A'); $this->iterator->add('B'); $this->iterator->add('C'); $result = $this->iterator->next(); $this->assertEquals('B', $result); }
/** * @covers CollectionType\Iterator\IteratorAbstract::clear */ public function testClear() { $this->iterator->add('A'); $this->iterator->add('B'); $this->iterator->clear(); $result = $this->iterator->count(); $this->assertEquals(0, $result); }
/** * @covers CollectionType\Iterator\IteratorAbstract::rewind */ public function testRewindForFewValuesAfterCallNextMethod() { $this->iterator->add('A'); $this->iterator->add('B'); $this->iterator->add('C'); $this->iterator->next(); $this->iterator->next(); $result = $this->iterator->rewind(); $this->assertEquals('A', $result); }
/** * @covers CollectionType\Iterator\IteratorAbstract::count */ public function testCountForManyValues() { $this->iterator->add('A'); $this->iterator->add('B'); $this->iterator->add('C'); $this->iterator->add('D'); $this->iterator->add('E'); $result = $this->iterator->count(); $this->assertEquals(5, $result); }
/** * @covers CollectionType\Iterator\IteratorAbstract::getIterator */ public function testGetIterator() { $result = $this->iterator->getIterator(); $this->assertInstanceOf('\\ArrayIterator', $result); }