PhpBench\Tests\Unit\Benchmark\Metadata\FactoryTest::testValidationBeforeMethodsSubject PHP Méthode

testValidationBeforeMethodsSubject() public méthode

It should throw an exception if a before/after method does not exist on the subject.
    public function testValidationBeforeMethodsSubject()
    {
        $this->hierarchy->isEmpty()->willReturn(false);
        $this->reflection->class = 'TestClass';
        TestUtil::configureBenchmarkMetadata($this->metadata, []);
        $this->metadata->getSubjects()->willReturn([$this->subjectMetadata->reveal()]);
        TestUtil::configureSubjectMetadata($this->subjectMetadata, ['beforeMethods' => ['beforeMe']]);
        $this->hierarchy->hasMethod('beforeMe')->willReturn(false);
        $this->factory->getMetadataForFile(self::FNAME);
    }