/** * @depends testSetEntity */ public function testGetIterator(Collection $collection) { $this->collectionContainer->setEntity($collection); $iterator = $this->collectionContainer->getIterator(); $this->assertInstanceOf(\Iterator::class, $iterator); $this->assertSame(count($collection), count($iterator)); }