PhpBench\Tests\Unit\Benchmark\Metadata\FactoryTest::testValidationBeforeMethodsSubject PHP Метод

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

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);
    }