public function testAddReflectionsAndIterate()
{
$this->hierarchy->addReflectionClass($this->reflection1);
$this->hierarchy->addReflectionClass($this->reflection2);
foreach ($this->hierarchy as $index => $reflectionClass) {
$this->assertInstanceOf('PhpBench\\Benchmark\\Remote\\ReflectionClass', $reflectionClass);
}
$this->assertEquals(1, $index);
$top = $this->hierarchy->getTop();
$this->assertSame($this->reflection1, $top);
}