PhpBench\Tests\Unit\Benchmark\Remote\ReflectionHierarchyTest::testAddReflectionsAndIterate PHP Метод

testAddReflectionsAndIterate() публичный Метод

It is iterable. It should get the top reflection.
    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);
    }