BetterReflectionTest\Reflection\ReflectionClassTest::testGetAst PHP Метод

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

public testGetAst ( )
    public function testGetAst()
    {
        $php = '<?php
            class Foo {}
        ';
        $reflection = (new ClassReflector(new StringSourceLocator($php)))->reflect('Foo');
        $ast = $reflection->getAst();
        $this->assertInstanceOf(Class_::class, $ast);
        $this->assertSame('Foo', $ast->name);
    }
ReflectionClassTest