PhpBench\Tests\Unit\Benchmark\Metadata\FactoryTest::testWithSubjects PHP Method

testWithSubjects() public method

It will return a benchmark populated with subjects.
public testWithSubjects ( )
    public function testWithSubjects()
    {
        $this->hierarchy->isEmpty()->willReturn(false);
        $this->metadata->getSubjects()->willReturn([$this->subjectMetadata->reveal()]);
        TestUtil::configureBenchmarkMetadata($this->metadata, ['path' => self::PATH]);
        TestUtil::configureSubjectMetadata($this->subjectMetadata);
        $this->reflector->getParameterSets(self::PATH, [])->willReturn([]);
        $this->subjectMetadata->setParameterSets([])->shouldBeCalled();
        $metadata = $this->factory->getMetadataForFile(self::FNAME);
        $this->assertInstanceOf('PhpBench\\Benchmark\\Metadata\\BenchmarkMetadata', $metadata);
        $this->assertInternalType('array', $metadata->getSubjects());
        $this->assertCount(1, $metadata->getSubjects());
    }