PhpBench\Tests\Benchmark\BenchmarkFinderTest::testBuildCollection PHP Method

testBuildCollection() public method

It should not instantiate abstract classes.
public testBuildCollection ( )
    public function testBuildCollection()
    {
        $this->factory->getMetadataForFile(__DIR__ . '/findertest/FooCaseBench.php')->willReturn($this->benchmark1->reveal());
        $this->factory->getMetadataForFile(__DIR__ . '/findertest/FooCase2Bench.php')->willReturn($this->benchmark2->reveal());
        $this->factory->getMetadataForFile(__DIR__ . '/findertest/AbstractBench.php')->willReturn(null);
        $benchmarks = $this->finder->findBenchmarks(__DIR__ . '/findertest');
        $this->assertCount(2, $benchmarks);
        $this->assertContainsOnlyInstancesOf('PhpBench\\Benchmark\\Metadata\\BenchmarkMetadata', $benchmarks);
    }